{
 "cells": [
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "<!--BOOK_INFORMATION-->\n",
    "<a href=\"https://user-images.githubusercontent.com/19553554/71825144-2d568180-30d6-11ea-8ee0-63c849cfd934.png\" target=\"_blank\"><img align=\"left\" style=\"width: 76px; height: 100px; background: white; padding: 1px; border: 1px solid black; margin-right:10px;\"></a>\n",
    "*pyecharts 是一个用于生成 Echarts 图表的类库。Echarts 是百度开源的一个数据可视化 JS 库。用 Echarts 生成的图可视化效果非常棒，为了与 Python 进行对接，方便在 Python 中直接使用数据生成图，于是有人开发出了这个项目[GitHub](https://github.com/pyecharts/pyecharts) .*\n",
    "\n",
    "*Note.建议本程序在参看https://github.com/pyecharts/pyecharts 的安装步骤后再运行； 本程序所有的例子都是从官方提供的样例代码[GitHub](https://github.com/pyecharts/pyecharts-gallery)中提取的,如果对某个API有疑问建议在IDE里面查看*\n",
    "\n",
    "*Echart类型图种大全:https://echarts.apache.org/examples/zh/#chart-type-line pyecharts图导入到ppt中的方法:https://baijiahao.baidu.com/s?id=1663839456876951842&wfr=spider&for=pc.*\n",
    "\n",
    "*作者: LBQ; 时间:2020/7/24. 邮箱:779660843@qq.com*"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "# XXI.3D地图(Map3D)"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "## 基础示例-中国地图"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 1,
   "metadata": {},
   "outputs": [
    {
     "name": "stderr",
     "output_type": "stream",
     "text": [
      "/home/fisadm/anaconda3/envs/detectron2/lib/python3.7/site-packages/pyecharts/charts/chart.py:14: PendingDeprecationWarning: pyecharts 所有图表类型将在 v1.9.0 版本开始强制使用 ChartItem 进行数据项配置 :)\n",
      "  super().__init__(init_opts=init_opts)\n"
     ]
    },
    {
     "data": {
      "text/html": [
       "\n",
       "<script>\n",
       "    require.config({\n",
       "        paths: {\n",
       "            'echarts':'https://assets.pyecharts.org/assets/echarts.min', 'echarts-gl':'https://assets.pyecharts.org/assets/echarts-gl.min', 'china':'https://assets.pyecharts.org/assets/maps/china'\n",
       "        }\n",
       "    });\n",
       "</script>\n",
       "\n",
       "        <div id=\"3bb21b6692c248858f591d2d81d49992\" style=\"width:900px; height:500px;\"></div>\n",
       "\n",
       "<script>\n",
       "        require(['echarts', 'echarts-gl', 'china'], function(echarts) {\n",
       "                var chart_3bb21b6692c248858f591d2d81d49992 = echarts.init(\n",
       "                    document.getElementById('3bb21b6692c248858f591d2d81d49992'), 'white', {renderer: 'canvas'});\n",
       "                var option_3bb21b6692c248858f591d2d81d49992 = {\n",
       "    \"animation\": true,\n",
       "    \"animationThreshold\": 2000,\n",
       "    \"animationDuration\": 1000,\n",
       "    \"animationEasing\": \"cubicOut\",\n",
       "    \"animationDelay\": 0,\n",
       "    \"animationDurationUpdate\": 300,\n",
       "    \"animationEasingUpdate\": \"cubicOut\",\n",
       "    \"animationDelayUpdate\": 0,\n",
       "    \"color\": [\n",
       "        \"#c23531\",\n",
       "        \"#2f4554\",\n",
       "        \"#61a0a8\",\n",
       "        \"#d48265\",\n",
       "        \"#749f83\",\n",
       "        \"#ca8622\",\n",
       "        \"#bda29a\",\n",
       "        \"#6e7074\",\n",
       "        \"#546570\",\n",
       "        \"#c4ccd3\",\n",
       "        \"#f05b72\",\n",
       "        \"#ef5b9c\",\n",
       "        \"#f47920\",\n",
       "        \"#905a3d\",\n",
       "        \"#fab27b\",\n",
       "        \"#2a5caa\",\n",
       "        \"#444693\",\n",
       "        \"#726930\",\n",
       "        \"#b2d235\",\n",
       "        \"#6d8346\",\n",
       "        \"#ac6767\",\n",
       "        \"#1d953f\",\n",
       "        \"#6950a1\",\n",
       "        \"#918597\"\n",
       "    ],\n",
       "    \"series\": [\n",
       "        {\n",
       "            \"type\": \"map3D\",\n",
       "            \"map\": \"map3D\",\n",
       "            \"coordinateSystem\": \"geo3D\",\n",
       "            \"label\": {\n",
       "                \"show\": true,\n",
       "                \"position\": \"top\",\n",
       "                \"margin\": 8\n",
       "            },\n",
       "            \"data\": [],\n",
       "            \"showLegendSymbol\": true,\n",
       "            \"emphasis\": {}\n",
       "        }\n",
       "    ],\n",
       "    \"legend\": [\n",
       "        {\n",
       "            \"data\": [\n",
       "                \"\"\n",
       "            ],\n",
       "            \"selected\": {\n",
       "                \"\": true\n",
       "            },\n",
       "            \"show\": true,\n",
       "            \"padding\": 5,\n",
       "            \"itemGap\": 10,\n",
       "            \"itemWidth\": 25,\n",
       "            \"itemHeight\": 14\n",
       "        }\n",
       "    ],\n",
       "    \"tooltip\": {\n",
       "        \"show\": true,\n",
       "        \"trigger\": \"item\",\n",
       "        \"triggerOn\": \"mousemove|click\",\n",
       "        \"axisPointer\": {\n",
       "            \"type\": \"line\"\n",
       "        },\n",
       "        \"showContent\": true,\n",
       "        \"alwaysShowContent\": false,\n",
       "        \"showDelay\": 0,\n",
       "        \"hideDelay\": 100,\n",
       "        \"textStyle\": {\n",
       "            \"fontSize\": 14\n",
       "        },\n",
       "        \"borderWidth\": 0,\n",
       "        \"padding\": 5\n",
       "    },\n",
       "    \"visualMap\": {\n",
       "        \"show\": false,\n",
       "        \"type\": \"continuous\",\n",
       "        \"min\": 0,\n",
       "        \"max\": 100,\n",
       "        \"inRange\": {\n",
       "            \"color\": [\n",
       "                \"#50a3ba\",\n",
       "                \"#eac763\",\n",
       "                \"#d94e5d\"\n",
       "            ]\n",
       "        },\n",
       "        \"calculable\": true,\n",
       "        \"inverse\": false,\n",
       "        \"splitNumber\": 5,\n",
       "        \"orient\": \"vertical\",\n",
       "        \"showLabel\": true,\n",
       "        \"itemWidth\": 20,\n",
       "        \"itemHeight\": 140,\n",
       "        \"borderWidth\": 0\n",
       "    },\n",
       "    \"geo3D\": {\n",
       "        \"map\": \"china\",\n",
       "        \"boxWidth\": 100,\n",
       "        \"boxHeight\": 10,\n",
       "        \"regionHeight\": 3,\n",
       "        \"groundPlane\": {\n",
       "            \"show\": false,\n",
       "            \"color\": \"#aaa\"\n",
       "        },\n",
       "        \"instancing\": false,\n",
       "        \"itemStyle\": {\n",
       "            \"color\": \"rgb(5,101,123)\",\n",
       "            \"borderColor\": \"rgb(62,215,213)\",\n",
       "            \"borderWidth\": 0.8,\n",
       "            \"opacity\": 1\n",
       "        },\n",
       "        \"label\": {\n",
       "            \"show\": true,\n",
       "            \"textStyle\": {\n",
       "                \"color\": \"#fff\",\n",
       "                \"fontSize\": 16,\n",
       "                \"backgroundColor\": \"rgba(0,0,0,0)\"\n",
       "            }\n",
       "        },\n",
       "        \"emphasis\": {\n",
       "            \"label\": {\n",
       "                \"show\": true,\n",
       "                \"position\": \"top\",\n",
       "                \"margin\": 8\n",
       "            }\n",
       "        },\n",
       "        \"light\": {\n",
       "            \"main\": {\n",
       "                \"color\": \"#fff\",\n",
       "                \"intensity\": 1.2,\n",
       "                \"shadow\": false,\n",
       "                \"shadowQuality\": \"medium\",\n",
       "                \"alpha\": 55,\n",
       "                \"beta\": 10\n",
       "            },\n",
       "            \"ambient\": {\n",
       "                \"color\": \"#fff\",\n",
       "                \"intensity\": 0.3\n",
       "            },\n",
       "            \"ambientCubemap\": {\n",
       "                \"diffuseIntensity\": 0.5,\n",
       "                \"specularIntensity\": 0.5\n",
       "            }\n",
       "        },\n",
       "        \"temporalSuperSampling\": {\n",
       "            \"enable\": \"auto\"\n",
       "        },\n",
       "        \"zlevel\": -10,\n",
       "        \"left\": \"auto\",\n",
       "        \"top\": \"auto\",\n",
       "        \"right\": \"auto\",\n",
       "        \"bottom\": \"auto\",\n",
       "        \"width\": \"auto\",\n",
       "        \"height\": \"auto\"\n",
       "    },\n",
       "    \"title\": [\n",
       "        {\n",
       "            \"text\": \"\\u5168\\u56fd\\u884c\\u653f\\u533a\\u5212\\u5730\\u56fe-Base\",\n",
       "            \"padding\": 5,\n",
       "            \"itemGap\": 10\n",
       "        }\n",
       "    ]\n",
       "};\n",
       "                chart_3bb21b6692c248858f591d2d81d49992.setOption(option_3bb21b6692c248858f591d2d81d49992);\n",
       "        });\n",
       "    </script>\n"
      ],
      "text/plain": [
       "<pyecharts.render.display.HTML at 0x7f90143109b0>"
      ]
     },
     "execution_count": 1,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "from pyecharts import options as opts\n",
    "from pyecharts.charts import Map3D\n",
    "from pyecharts.globals import ChartType\n",
    "\n",
    "c = (\n",
    "    Map3D()\n",
    "    .add_schema(\n",
    "        itemstyle_opts=opts.ItemStyleOpts(\n",
    "            color=\"rgb(5,101,123)\",\n",
    "            opacity=1,\n",
    "            border_width=0.8,\n",
    "            border_color=\"rgb(62,215,213)\",\n",
    "        ),\n",
    "        map3d_label=opts.Map3DLabelOpts(\n",
    "            is_show=True,\n",
    "            text_style=opts.TextStyleOpts(\n",
    "                color=\"#fff\", font_size=16, background_color=\"rgba(0,0,0,0)\"\n",
    "            ),\n",
    "        ),\n",
    "        emphasis_label_opts=opts.LabelOpts(is_show=True),\n",
    "        light_opts=opts.Map3DLightOpts(\n",
    "            main_color=\"#fff\",\n",
    "            main_intensity=1.2,\n",
    "            is_main_shadow=False,\n",
    "            main_alpha=55,\n",
    "            main_beta=10,\n",
    "            ambient_intensity=0.3,\n",
    "        ),\n",
    "    )\n",
    "    .add(series_name=\"\", data_pair=\"\", maptype=ChartType.MAP3D)\n",
    "    .set_global_opts(\n",
    "        title_opts=opts.TitleOpts(title=\"全国行政区划地图-Base\"),\n",
    "        visualmap_opts=opts.VisualMapOpts(is_show=False),\n",
    "        tooltip_opts=opts.TooltipOpts(is_show=True),\n",
    "    )\n",
    "    #.render(\"map3d_china_base.html\")\n",
    ")\n",
    "c.load_javascript()\n",
    "c.render_notebook()"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "## 植入柱形图 "
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 2,
   "metadata": {},
   "outputs": [
    {
     "name": "stderr",
     "output_type": "stream",
     "text": [
      "/home/fisadm/anaconda3/envs/detectron2/lib/python3.7/site-packages/pyecharts/charts/chart.py:14: PendingDeprecationWarning: pyecharts 所有图表类型将在 v1.9.0 版本开始强制使用 ChartItem 进行数据项配置 :)\n",
      "  super().__init__(init_opts=init_opts)\n"
     ]
    },
    {
     "data": {
      "text/html": [
       "\n",
       "<script>\n",
       "    require.config({\n",
       "        paths: {\n",
       "            'echarts':'https://assets.pyecharts.org/assets/echarts.min', 'echarts-gl':'https://assets.pyecharts.org/assets/echarts-gl.min', 'china':'https://assets.pyecharts.org/assets/maps/china'\n",
       "        }\n",
       "    });\n",
       "</script>\n",
       "\n",
       "        <div id=\"70bb8612dbde431393da8acf4de46bea\" style=\"width:900px; height:500px;\"></div>\n",
       "\n",
       "<script>\n",
       "        require(['echarts', 'echarts-gl', 'china'], function(echarts) {\n",
       "                var chart_70bb8612dbde431393da8acf4de46bea = echarts.init(\n",
       "                    document.getElementById('70bb8612dbde431393da8acf4de46bea'), 'white', {renderer: 'canvas'});\n",
       "                var option_70bb8612dbde431393da8acf4de46bea = {\n",
       "    \"animation\": true,\n",
       "    \"animationThreshold\": 2000,\n",
       "    \"animationDuration\": 1000,\n",
       "    \"animationEasing\": \"cubicOut\",\n",
       "    \"animationDelay\": 0,\n",
       "    \"animationDurationUpdate\": 300,\n",
       "    \"animationEasingUpdate\": \"cubicOut\",\n",
       "    \"animationDelayUpdate\": 0,\n",
       "    \"color\": [\n",
       "        \"#c23531\",\n",
       "        \"#2f4554\",\n",
       "        \"#61a0a8\",\n",
       "        \"#d48265\",\n",
       "        \"#749f83\",\n",
       "        \"#ca8622\",\n",
       "        \"#bda29a\",\n",
       "        \"#6e7074\",\n",
       "        \"#546570\",\n",
       "        \"#c4ccd3\",\n",
       "        \"#f05b72\",\n",
       "        \"#ef5b9c\",\n",
       "        \"#f47920\",\n",
       "        \"#905a3d\",\n",
       "        \"#fab27b\",\n",
       "        \"#2a5caa\",\n",
       "        \"#444693\",\n",
       "        \"#726930\",\n",
       "        \"#b2d235\",\n",
       "        \"#6d8346\",\n",
       "        \"#ac6767\",\n",
       "        \"#1d953f\",\n",
       "        \"#6950a1\",\n",
       "        \"#918597\"\n",
       "    ],\n",
       "    \"series\": [\n",
       "        {\n",
       "            \"type\": \"bar3D\",\n",
       "            \"name\": \"bar3D\",\n",
       "            \"coordinateSystem\": \"geo3D\",\n",
       "            \"grid3DIndex\": 0,\n",
       "            \"geo3DIndex\": 0,\n",
       "            \"globeIndex\": 0,\n",
       "            \"barSize\": 1,\n",
       "            \"bevelSize\": 0,\n",
       "            \"bevelSmoothness\": 2,\n",
       "            \"minHeight\": 2,\n",
       "            \"label\": {\n",
       "                \"show\": false,\n",
       "                \"position\": \"top\",\n",
       "                \"margin\": 8,\n",
       "                \"formatter\": function(data){return data.name + ' ' + data.value[2];}\n",
       "            },\n",
       "            \"emphasis\": {},\n",
       "            \"data\": [\n",
       "                {\n",
       "                    \"name\": \"\\u9ed1\\u9f99\\u6c5f\",\n",
       "                    \"value\": [\n",
       "                        127.9688,\n",
       "                        45.368,\n",
       "                        100\n",
       "                    ]\n",
       "                },\n",
       "                {\n",
       "                    \"name\": \"\\u5185\\u8499\\u53e4\",\n",
       "                    \"value\": [\n",
       "                        110.3467,\n",
       "                        41.4899,\n",
       "                        300\n",
       "                    ]\n",
       "                },\n",
       "                {\n",
       "                    \"name\": \"\\u5409\\u6797\",\n",
       "                    \"value\": [\n",
       "                        125.8154,\n",
       "                        44.2584,\n",
       "                        300\n",
       "                    ]\n",
       "                },\n",
       "                {\n",
       "                    \"name\": \"\\u8fbd\\u5b81\",\n",
       "                    \"value\": [\n",
       "                        123.1238,\n",
       "                        42.1216,\n",
       "                        300\n",
       "                    ]\n",
       "                },\n",
       "                {\n",
       "                    \"name\": \"\\u6cb3\\u5317\",\n",
       "                    \"value\": [\n",
       "                        114.4995,\n",
       "                        38.1006,\n",
       "                        300\n",
       "                    ]\n",
       "                },\n",
       "                {\n",
       "                    \"name\": \"\\u5929\\u6d25\",\n",
       "                    \"value\": [\n",
       "                        117.4219,\n",
       "                        39.4189,\n",
       "                        300\n",
       "                    ]\n",
       "                },\n",
       "                {\n",
       "                    \"name\": \"\\u5c71\\u897f\",\n",
       "                    \"value\": [\n",
       "                        112.3352,\n",
       "                        37.9413,\n",
       "                        300\n",
       "                    ]\n",
       "                },\n",
       "                {\n",
       "                    \"name\": \"\\u9655\\u897f\",\n",
       "                    \"value\": [\n",
       "                        109.1162,\n",
       "                        34.2004,\n",
       "                        300\n",
       "                    ]\n",
       "                },\n",
       "                {\n",
       "                    \"name\": \"\\u7518\\u8083\",\n",
       "                    \"value\": [\n",
       "                        103.5901,\n",
       "                        36.3043,\n",
       "                        300\n",
       "                    ]\n",
       "                },\n",
       "                {\n",
       "                    \"name\": \"\\u5b81\\u590f\",\n",
       "                    \"value\": [\n",
       "                        106.3586,\n",
       "                        38.1775,\n",
       "                        300\n",
       "                    ]\n",
       "                },\n",
       "                {\n",
       "                    \"name\": \"\\u9752\\u6d77\",\n",
       "                    \"value\": [\n",
       "                        101.4038,\n",
       "                        36.8207,\n",
       "                        300\n",
       "                    ]\n",
       "                },\n",
       "                {\n",
       "                    \"name\": \"\\u65b0\\u7586\",\n",
       "                    \"value\": [\n",
       "                        87.9236,\n",
       "                        43.5883,\n",
       "                        300\n",
       "                    ]\n",
       "                },\n",
       "                {\n",
       "                    \"name\": \"\\u897f\\u85cf\",\n",
       "                    \"value\": [\n",
       "                        91.11,\n",
       "                        29.97,\n",
       "                        300\n",
       "                    ]\n",
       "                },\n",
       "                {\n",
       "                    \"name\": \"\\u56db\\u5ddd\",\n",
       "                    \"value\": [\n",
       "                        103.9526,\n",
       "                        30.7617,\n",
       "                        300\n",
       "                    ]\n",
       "                },\n",
       "                {\n",
       "                    \"name\": \"\\u91cd\\u5e86\",\n",
       "                    \"value\": [\n",
       "                        108.384366,\n",
       "                        30.439702,\n",
       "                        300\n",
       "                    ]\n",
       "                },\n",
       "                {\n",
       "                    \"name\": \"\\u5c71\\u4e1c\",\n",
       "                    \"value\": [\n",
       "                        117.1582,\n",
       "                        36.8701,\n",
       "                        300\n",
       "                    ]\n",
       "                },\n",
       "                {\n",
       "                    \"name\": \"\\u6cb3\\u5357\",\n",
       "                    \"value\": [\n",
       "                        113.4668,\n",
       "                        34.6234,\n",
       "                        300\n",
       "                    ]\n",
       "                },\n",
       "                {\n",
       "                    \"name\": \"\\u6c5f\\u82cf\",\n",
       "                    \"value\": [\n",
       "                        118.8062,\n",
       "                        31.9208,\n",
       "                        300\n",
       "                    ]\n",
       "                },\n",
       "                {\n",
       "                    \"name\": \"\\u5b89\\u5fbd\",\n",
       "                    \"value\": [\n",
       "                        117.29,\n",
       "                        32.0581,\n",
       "                        300\n",
       "                    ]\n",
       "                },\n",
       "                {\n",
       "                    \"name\": \"\\u6e56\\u5317\",\n",
       "                    \"value\": [\n",
       "                        114.3896,\n",
       "                        30.6628,\n",
       "                        300\n",
       "                    ]\n",
       "                },\n",
       "                {\n",
       "                    \"name\": \"\\u6d59\\u6c5f\",\n",
       "                    \"value\": [\n",
       "                        119.5313,\n",
       "                        29.8773,\n",
       "                        300\n",
       "                    ]\n",
       "                },\n",
       "                {\n",
       "                    \"name\": \"\\u798f\\u5efa\",\n",
       "                    \"value\": [\n",
       "                        119.4543,\n",
       "                        25.9222,\n",
       "                        300\n",
       "                    ]\n",
       "                },\n",
       "                {\n",
       "                    \"name\": \"\\u6c5f\\u897f\",\n",
       "                    \"value\": [\n",
       "                        116.0046,\n",
       "                        28.6633,\n",
       "                        300\n",
       "                    ]\n",
       "                },\n",
       "                {\n",
       "                    \"name\": \"\\u6e56\\u5357\",\n",
       "                    \"value\": [\n",
       "                        113.0823,\n",
       "                        28.2568,\n",
       "                        300\n",
       "                    ]\n",
       "                },\n",
       "                {\n",
       "                    \"name\": \"\\u8d35\\u5dde\",\n",
       "                    \"value\": [\n",
       "                        106.6992,\n",
       "                        26.7682,\n",
       "                        300\n",
       "                    ]\n",
       "                },\n",
       "                {\n",
       "                    \"name\": \"\\u5e7f\\u897f\",\n",
       "                    \"value\": [\n",
       "                        108.479,\n",
       "                        23.1152,\n",
       "                        300\n",
       "                    ]\n",
       "                },\n",
       "                {\n",
       "                    \"name\": \"\\u6d77\\u5357\",\n",
       "                    \"value\": [\n",
       "                        110.3893,\n",
       "                        19.8516,\n",
       "                        300\n",
       "                    ]\n",
       "                },\n",
       "                {\n",
       "                    \"name\": \"\\u4e0a\\u6d77\",\n",
       "                    \"value\": [\n",
       "                        121.4648,\n",
       "                        31.2891,\n",
       "                        1300\n",
       "                    ]\n",
       "                }\n",
       "            ],\n",
       "            \"shading\": \"lambert\",\n",
       "            \"zlevel\": -10,\n",
       "            \"silent\": false,\n",
       "            \"animation\": true,\n",
       "            \"animationDurationUpdate\": 100,\n",
       "            \"animationEasingUpdate\": \"cubicOut\"\n",
       "        }\n",
       "    ],\n",
       "    \"legend\": [\n",
       "        {\n",
       "            \"data\": [\n",
       "                \"bar3D\"\n",
       "            ],\n",
       "            \"selected\": {\n",
       "                \"bar3D\": true\n",
       "            },\n",
       "            \"show\": true,\n",
       "            \"padding\": 5,\n",
       "            \"itemGap\": 10,\n",
       "            \"itemWidth\": 25,\n",
       "            \"itemHeight\": 14\n",
       "        }\n",
       "    ],\n",
       "    \"tooltip\": {\n",
       "        \"show\": true,\n",
       "        \"trigger\": \"item\",\n",
       "        \"triggerOn\": \"mousemove|click\",\n",
       "        \"axisPointer\": {\n",
       "            \"type\": \"line\"\n",
       "        },\n",
       "        \"showContent\": true,\n",
       "        \"alwaysShowContent\": false,\n",
       "        \"showDelay\": 0,\n",
       "        \"hideDelay\": 100,\n",
       "        \"textStyle\": {\n",
       "            \"fontSize\": 14\n",
       "        },\n",
       "        \"borderWidth\": 0,\n",
       "        \"padding\": 5\n",
       "    },\n",
       "    \"geo3D\": {\n",
       "        \"map\": \"china\",\n",
       "        \"boxWidth\": 100,\n",
       "        \"boxHeight\": 10,\n",
       "        \"regionHeight\": 3,\n",
       "        \"groundPlane\": {\n",
       "            \"show\": false,\n",
       "            \"color\": \"#aaa\"\n",
       "        },\n",
       "        \"instancing\": false,\n",
       "        \"itemStyle\": {\n",
       "            \"color\": \"rgb(5,101,123)\",\n",
       "            \"borderColor\": \"rgb(62,215,213)\",\n",
       "            \"borderWidth\": 0.8,\n",
       "            \"opacity\": 1\n",
       "        },\n",
       "        \"label\": {\n",
       "            \"show\": false,\n",
       "            \"formatter\": function(data){return data.name +  + data.value[2];}\n",
       "        },\n",
       "        \"emphasis\": {\n",
       "            \"label\": {\n",
       "                \"show\": false,\n",
       "                \"position\": \"top\",\n",
       "                \"color\": \"#fff\",\n",
       "                \"margin\": 8,\n",
       "                \"fontSize\": 10,\n",
       "                \"backgroundColor\": \"rgba(0,23,11,0)\"\n",
       "            }\n",
       "        },\n",
       "        \"light\": {\n",
       "            \"main\": {\n",
       "                \"color\": \"#fff\",\n",
       "                \"intensity\": 1.2,\n",
       "                \"shadow\": false,\n",
       "                \"shadowQuality\": \"high\",\n",
       "                \"alpha\": 40,\n",
       "                \"beta\": 10\n",
       "            },\n",
       "            \"ambient\": {\n",
       "                \"color\": \"#fff\",\n",
       "                \"intensity\": 0.3\n",
       "            },\n",
       "            \"ambientCubemap\": {\n",
       "                \"diffuseIntensity\": 0.5,\n",
       "                \"specularIntensity\": 0.5\n",
       "            }\n",
       "        },\n",
       "        \"temporalSuperSampling\": {\n",
       "            \"enable\": \"auto\"\n",
       "        },\n",
       "        \"zlevel\": -10,\n",
       "        \"left\": \"auto\",\n",
       "        \"top\": \"auto\",\n",
       "        \"right\": \"auto\",\n",
       "        \"bottom\": \"auto\",\n",
       "        \"width\": \"auto\",\n",
       "        \"height\": \"auto\"\n",
       "    },\n",
       "    \"title\": [\n",
       "        {\n",
       "            \"text\": \"Map3D-Bar3D\",\n",
       "            \"padding\": 5,\n",
       "            \"itemGap\": 10\n",
       "        }\n",
       "    ]\n",
       "};\n",
       "                chart_70bb8612dbde431393da8acf4de46bea.setOption(option_70bb8612dbde431393da8acf4de46bea);\n",
       "        });\n",
       "    </script>\n"
      ],
      "text/plain": [
       "<pyecharts.render.display.HTML at 0x7f901436d320>"
      ]
     },
     "execution_count": 2,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "from pyecharts import options as opts\n",
    "from pyecharts.charts import Map3D\n",
    "from pyecharts.globals import ChartType\n",
    "from pyecharts.commons.utils import JsCode\n",
    "\n",
    "example_data = [\n",
    "    (\"黑龙江\", [127.9688, 45.368, 100]),\n",
    "    (\"内蒙古\", [110.3467, 41.4899, 300]),\n",
    "    (\"吉林\", [125.8154, 44.2584, 300]),\n",
    "    (\"辽宁\", [123.1238, 42.1216, 300]),\n",
    "    (\"河北\", [114.4995, 38.1006, 300]),\n",
    "    (\"天津\", [117.4219, 39.4189, 300]),\n",
    "    (\"山西\", [112.3352, 37.9413, 300]),\n",
    "    (\"陕西\", [109.1162, 34.2004, 300]),\n",
    "    (\"甘肃\", [103.5901, 36.3043, 300]),\n",
    "    (\"宁夏\", [106.3586, 38.1775, 300]),\n",
    "    (\"青海\", [101.4038, 36.8207, 300]),\n",
    "    (\"新疆\", [87.9236, 43.5883, 300]),\n",
    "    (\"西藏\", [91.11, 29.97, 300]),\n",
    "    (\"四川\", [103.9526, 30.7617, 300]),\n",
    "    (\"重庆\", [108.384366, 30.439702, 300]),\n",
    "    (\"山东\", [117.1582, 36.8701, 300]),\n",
    "    (\"河南\", [113.4668, 34.6234, 300]),\n",
    "    (\"江苏\", [118.8062, 31.9208, 300]),\n",
    "    (\"安徽\", [117.29, 32.0581, 300]),\n",
    "    (\"湖北\", [114.3896, 30.6628, 300]),\n",
    "    (\"浙江\", [119.5313, 29.8773, 300]),\n",
    "    (\"福建\", [119.4543, 25.9222, 300]),\n",
    "    (\"江西\", [116.0046, 28.6633, 300]),\n",
    "    (\"湖南\", [113.0823, 28.2568, 300]),\n",
    "    (\"贵州\", [106.6992, 26.7682, 300]),\n",
    "    (\"广西\", [108.479, 23.1152, 300]),\n",
    "    (\"海南\", [110.3893, 19.8516, 300]),\n",
    "    (\"上海\", [121.4648, 31.2891, 1300]),\n",
    "]\n",
    "\n",
    "c = (\n",
    "    Map3D()\n",
    "    .add_schema(\n",
    "        itemstyle_opts=opts.ItemStyleOpts(\n",
    "            color=\"rgb(5,101,123)\",\n",
    "            opacity=1,\n",
    "            border_width=0.8,\n",
    "            border_color=\"rgb(62,215,213)\",\n",
    "        ),\n",
    "        map3d_label=opts.Map3DLabelOpts(\n",
    "            is_show=False,\n",
    "            formatter=JsCode(\"function(data){return data.name + \" \" + data.value[2];}\"),\n",
    "        ),\n",
    "        emphasis_label_opts=opts.LabelOpts(\n",
    "            is_show=False,\n",
    "            color=\"#fff\",\n",
    "            font_size=10,\n",
    "            background_color=\"rgba(0,23,11,0)\",\n",
    "        ),\n",
    "        light_opts=opts.Map3DLightOpts(\n",
    "            main_color=\"#fff\",\n",
    "            main_intensity=1.2,\n",
    "            main_shadow_quality=\"high\",\n",
    "            is_main_shadow=False,\n",
    "            main_beta=10,\n",
    "            ambient_intensity=0.3,\n",
    "        ),\n",
    "    )\n",
    "    .add(\n",
    "        series_name=\"bar3D\",\n",
    "        data_pair=example_data,\n",
    "        type_=ChartType.BAR3D,\n",
    "        bar_size=1,\n",
    "        shading=\"lambert\",\n",
    "        label_opts=opts.LabelOpts(\n",
    "            is_show=False,\n",
    "            formatter=JsCode(\"function(data){return data.name + ' ' + data.value[2];}\"),\n",
    "        ),\n",
    "    )\n",
    "    .set_global_opts(title_opts=opts.TitleOpts(title=\"Map3D-Bar3D\"))\n",
    "    #.render(\"map3d_with_bar3d.html\")\n",
    ")\n",
    "c.load_javascript()\n",
    "c.render_notebook()"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "## 植入折线图"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 3,
   "metadata": {},
   "outputs": [
    {
     "name": "stderr",
     "output_type": "stream",
     "text": [
      "/home/fisadm/anaconda3/envs/detectron2/lib/python3.7/site-packages/pyecharts/charts/chart.py:14: PendingDeprecationWarning: pyecharts 所有图表类型将在 v1.9.0 版本开始强制使用 ChartItem 进行数据项配置 :)\n",
      "  super().__init__(init_opts=init_opts)\n"
     ]
    },
    {
     "data": {
      "text/html": [
       "\n",
       "<script>\n",
       "    require.config({\n",
       "        paths: {\n",
       "            'echarts':'https://assets.pyecharts.org/assets/echarts.min', 'echarts-gl':'https://assets.pyecharts.org/assets/echarts-gl.min', '山东':'https://assets.pyecharts.org/assets/maps/shandong'\n",
       "        }\n",
       "    });\n",
       "</script>\n",
       "\n",
       "        <div id=\"042fe76e8d3043989aab7021f6865fdf\" style=\"width:900px; height:500px;\"></div>\n",
       "\n",
       "<script>\n",
       "        require(['echarts', 'echarts-gl', '山东'], function(echarts) {\n",
       "                var chart_042fe76e8d3043989aab7021f6865fdf = echarts.init(\n",
       "                    document.getElementById('042fe76e8d3043989aab7021f6865fdf'), 'white', {renderer: 'canvas'});\n",
       "                var option_042fe76e8d3043989aab7021f6865fdf = {\n",
       "    \"animation\": true,\n",
       "    \"animationThreshold\": 2000,\n",
       "    \"animationDuration\": 1000,\n",
       "    \"animationEasing\": \"cubicOut\",\n",
       "    \"animationDelay\": 0,\n",
       "    \"animationDurationUpdate\": 300,\n",
       "    \"animationEasingUpdate\": \"cubicOut\",\n",
       "    \"animationDelayUpdate\": 0,\n",
       "    \"color\": [\n",
       "        \"#c23531\",\n",
       "        \"#2f4554\",\n",
       "        \"#61a0a8\",\n",
       "        \"#d48265\",\n",
       "        \"#749f83\",\n",
       "        \"#ca8622\",\n",
       "        \"#bda29a\",\n",
       "        \"#6e7074\",\n",
       "        \"#546570\",\n",
       "        \"#c4ccd3\",\n",
       "        \"#f05b72\",\n",
       "        \"#ef5b9c\",\n",
       "        \"#f47920\",\n",
       "        \"#905a3d\",\n",
       "        \"#fab27b\",\n",
       "        \"#2a5caa\",\n",
       "        \"#444693\",\n",
       "        \"#726930\",\n",
       "        \"#b2d235\",\n",
       "        \"#6d8346\",\n",
       "        \"#ac6767\",\n",
       "        \"#1d953f\",\n",
       "        \"#6950a1\",\n",
       "        \"#918597\"\n",
       "    ],\n",
       "    \"series\": [\n",
       "        {\n",
       "            \"type\": \"lines3D\",\n",
       "            \"coordinateSystem\": \"geo3D\",\n",
       "            \"geo3DIndex\": 0,\n",
       "            \"globeIndex\": 0,\n",
       "            \"polyline\": false,\n",
       "            \"effect\": {\n",
       "                \"show\": true,\n",
       "                \"period\": 4,\n",
       "                \"trailWidth\": 3,\n",
       "                \"trailLength\": 0.5,\n",
       "                \"trailColor\": \"#f00\",\n",
       "                \"trailOpacity\": 1\n",
       "            },\n",
       "            \"lineStyle\": {\n",
       "                \"show\": false,\n",
       "                \"width\": 1,\n",
       "                \"opacity\": 0,\n",
       "                \"curveness\": 0,\n",
       "                \"type\": \"solid\",\n",
       "                \"color\": \"#fff\"\n",
       "            },\n",
       "            \"data\": [\n",
       "                [\n",
       "                    [\n",
       "                        119.107078,\n",
       "                        36.70925,\n",
       "                        1000\n",
       "                    ],\n",
       "                    [\n",
       "                        116.587245,\n",
       "                        35.415393,\n",
       "                        1000\n",
       "                    ]\n",
       "                ],\n",
       "                [\n",
       "                    [\n",
       "                        117.000923,\n",
       "                        36.675807\n",
       "                    ],\n",
       "                    [\n",
       "                        120.355173,\n",
       "                        36.082982\n",
       "                    ]\n",
       "                ],\n",
       "                [\n",
       "                    [\n",
       "                        118.047648,\n",
       "                        36.814939\n",
       "                    ],\n",
       "                    [\n",
       "                        118.66471,\n",
       "                        37.434564\n",
       "                    ]\n",
       "                ],\n",
       "                [\n",
       "                    [\n",
       "                        121.391382,\n",
       "                        37.539297\n",
       "                    ],\n",
       "                    [\n",
       "                        119.107078,\n",
       "                        36.70925\n",
       "                    ]\n",
       "                ],\n",
       "                [\n",
       "                    [\n",
       "                        116.587245,\n",
       "                        35.415393\n",
       "                    ],\n",
       "                    [\n",
       "                        122.116394,\n",
       "                        37.509691\n",
       "                    ]\n",
       "                ],\n",
       "                [\n",
       "                    [\n",
       "                        119.461208,\n",
       "                        35.428588\n",
       "                    ],\n",
       "                    [\n",
       "                        118.326443,\n",
       "                        35.065282\n",
       "                    ]\n",
       "                ],\n",
       "                [\n",
       "                    [\n",
       "                        116.307428,\n",
       "                        37.453968\n",
       "                    ],\n",
       "                    [\n",
       "                        115.469381,\n",
       "                        35.246531\n",
       "                    ]\n",
       "                ]\n",
       "            ],\n",
       "            \"blendMode\": \"source-over\",\n",
       "            \"zlevel\": -10,\n",
       "            \"silent\": false\n",
       "        }\n",
       "    ],\n",
       "    \"legend\": [\n",
       "        {\n",
       "            \"data\": [\n",
       "                \"\"\n",
       "            ],\n",
       "            \"selected\": {\n",
       "                \"\": true\n",
       "            },\n",
       "            \"show\": true,\n",
       "            \"padding\": 5,\n",
       "            \"itemGap\": 10,\n",
       "            \"itemWidth\": 25,\n",
       "            \"itemHeight\": 14\n",
       "        }\n",
       "    ],\n",
       "    \"tooltip\": {\n",
       "        \"show\": true,\n",
       "        \"trigger\": \"item\",\n",
       "        \"triggerOn\": \"mousemove|click\",\n",
       "        \"axisPointer\": {\n",
       "            \"type\": \"line\"\n",
       "        },\n",
       "        \"showContent\": true,\n",
       "        \"alwaysShowContent\": false,\n",
       "        \"showDelay\": 0,\n",
       "        \"hideDelay\": 100,\n",
       "        \"textStyle\": {\n",
       "            \"fontSize\": 14\n",
       "        },\n",
       "        \"borderWidth\": 0,\n",
       "        \"padding\": 5\n",
       "    },\n",
       "    \"geo3D\": {\n",
       "        \"map\": \"\\u5c71\\u4e1c\",\n",
       "        \"boxWidth\": 100,\n",
       "        \"boxHeight\": 10,\n",
       "        \"regionHeight\": 3,\n",
       "        \"groundPlane\": {\n",
       "            \"show\": false,\n",
       "            \"color\": \"#aaa\"\n",
       "        },\n",
       "        \"instancing\": false,\n",
       "        \"itemStyle\": {\n",
       "            \"color\": \"rgb(5,101,123)\",\n",
       "            \"borderColor\": \"rgb(62,215,213)\",\n",
       "            \"borderWidth\": 0.8,\n",
       "            \"opacity\": 1\n",
       "        },\n",
       "        \"emphasis\": {},\n",
       "        \"light\": {\n",
       "            \"main\": {\n",
       "                \"color\": \"#fff\",\n",
       "                \"intensity\": 1.2,\n",
       "                \"shadow\": false,\n",
       "                \"shadowQuality\": \"medium\",\n",
       "                \"alpha\": 55,\n",
       "                \"beta\": 10\n",
       "            },\n",
       "            \"ambient\": {\n",
       "                \"color\": \"#fff\",\n",
       "                \"intensity\": 0.3\n",
       "            },\n",
       "            \"ambientCubemap\": {\n",
       "                \"diffuseIntensity\": 0.5,\n",
       "                \"specularIntensity\": 0.5\n",
       "            }\n",
       "        },\n",
       "        \"postEffect\": {\n",
       "            \"enable\": false,\n",
       "            \"bloom\": {\n",
       "                \"enable\": false,\n",
       "                \"bloomIntensity\": 0.1\n",
       "            },\n",
       "            \"depthOfField\": {\n",
       "                \"enable\": false,\n",
       "                \"focalDistance\": 50,\n",
       "                \"focalRange\": 20,\n",
       "                \"fstop\": 2.8,\n",
       "                \"blurRadius\": 10\n",
       "            },\n",
       "            \"SSAO\": {\n",
       "                \"enable\": false,\n",
       "                \"quality\": \"medium\",\n",
       "                \"radius\": 2,\n",
       "                \"intensity\": 1\n",
       "            },\n",
       "            \"colorCorrection\": {\n",
       "                \"enable\": false,\n",
       "                \"exposure\": 0,\n",
       "                \"brightness\": 0,\n",
       "                \"contrast\": 1,\n",
       "                \"saturation\": 1\n",
       "            },\n",
       "            \"FXAA\": {\n",
       "                \"enable\": false\n",
       "            }\n",
       "        },\n",
       "        \"temporalSuperSampling\": {\n",
       "            \"enable\": \"auto\"\n",
       "        },\n",
       "        \"viewControl\": {\n",
       "            \"projection\": \"perspective\",\n",
       "            \"autoRotate\": false,\n",
       "            \"autoRotateDirection\": \"cw\",\n",
       "            \"autoRotateSpeed\": 10,\n",
       "            \"autoRotateAfterStill\": 3,\n",
       "            \"damping\": 0.8,\n",
       "            \"rotateSensitivity\": 1,\n",
       "            \"zoomSensitivity\": 1,\n",
       "            \"panSensitivity\": 1,\n",
       "            \"panMouseButton\": \"left\",\n",
       "            \"rotateMouseButton\": \"middle\",\n",
       "            \"distance\": 100,\n",
       "            \"minDistance\": 40,\n",
       "            \"maxDistance\": 400,\n",
       "            \"orthographicSize\": 100,\n",
       "            \"minOrthographicSize\": 20,\n",
       "            \"maxOrthographicSize\": 400,\n",
       "            \"alpha\": 40,\n",
       "            \"beta\": 0,\n",
       "            \"center\": [\n",
       "                -10,\n",
       "                0,\n",
       "                10\n",
       "            ],\n",
       "            \"minAlpha\": 5,\n",
       "            \"maxAlpha\": 90,\n",
       "            \"minBeta\": -80,\n",
       "            \"maxBeta\": 80,\n",
       "            \"animation\": true,\n",
       "            \"animationDurationUpdate\": 1000,\n",
       "            \"animationEasingUpdate\": \"cubicInOut\"\n",
       "        },\n",
       "        \"zlevel\": -10,\n",
       "        \"left\": \"auto\",\n",
       "        \"top\": \"auto\",\n",
       "        \"right\": \"auto\",\n",
       "        \"bottom\": \"auto\",\n",
       "        \"width\": \"auto\",\n",
       "        \"height\": \"auto\"\n",
       "    },\n",
       "    \"title\": [\n",
       "        {\n",
       "            \"text\": \"Map3D-Lines3D\",\n",
       "            \"padding\": 5,\n",
       "            \"itemGap\": 10\n",
       "        }\n",
       "    ]\n",
       "};\n",
       "                chart_042fe76e8d3043989aab7021f6865fdf.setOption(option_042fe76e8d3043989aab7021f6865fdf);\n",
       "        });\n",
       "    </script>\n"
      ],
      "text/plain": [
       "<pyecharts.render.display.HTML at 0x7f9014688e10>"
      ]
     },
     "execution_count": 3,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "from pyecharts import options as opts\n",
    "from pyecharts.charts import Map3D\n",
    "from pyecharts.globals import ChartType\n",
    "\n",
    "example_data = [\n",
    "    [[119.107078, 36.70925, 1000], [116.587245, 35.415393, 1000]],\n",
    "    [[117.000923, 36.675807], [120.355173, 36.082982]],\n",
    "    [[118.047648, 36.814939], [118.66471, 37.434564]],\n",
    "    [[121.391382, 37.539297], [119.107078, 36.70925]],\n",
    "    [[116.587245, 35.415393], [122.116394, 37.509691]],\n",
    "    [[119.461208, 35.428588], [118.326443, 35.065282]],\n",
    "    [[116.307428, 37.453968], [115.469381, 35.246531]],\n",
    "]\n",
    "c = (\n",
    "    Map3D()\n",
    "    .add_schema(\n",
    "        maptype=\"山东\",\n",
    "        itemstyle_opts=opts.ItemStyleOpts(\n",
    "            color=\"rgb(5,101,123)\",\n",
    "            opacity=1,\n",
    "            border_width=0.8,\n",
    "            border_color=\"rgb(62,215,213)\",\n",
    "        ),\n",
    "        light_opts=opts.Map3DLightOpts(\n",
    "            main_color=\"#fff\",\n",
    "            main_intensity=1.2,\n",
    "            is_main_shadow=False,\n",
    "            main_alpha=55,\n",
    "            main_beta=10,\n",
    "            ambient_intensity=0.3,\n",
    "        ),\n",
    "        view_control_opts=opts.Map3DViewControlOpts(center=[-10, 0, 10]),\n",
    "        post_effect_opts=opts.Map3DPostEffectOpts(is_enable=False),\n",
    "    )\n",
    "    .add(\n",
    "        series_name=\"\",\n",
    "        data_pair=example_data,\n",
    "        type_=ChartType.LINES3D,\n",
    "        effect=opts.Lines3DEffectOpts(\n",
    "            is_show=True,\n",
    "            period=4,\n",
    "            trail_width=3,\n",
    "            trail_length=0.5,\n",
    "            trail_color=\"#f00\",\n",
    "            trail_opacity=1,\n",
    "        ),\n",
    "        linestyle_opts=opts.LineStyleOpts(is_show=False, color=\"#fff\", opacity=0),\n",
    "    )\n",
    "    .set_global_opts(title_opts=opts.TitleOpts(title=\"Map3D-Lines3D\"))\n",
    "    #.render(\"map3d_with_lines3d.html\")\n",
    ")\n",
    "c.load_javascript()\n",
    "c.render_notebook()"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "## 植入散点图"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 1,
   "metadata": {},
   "outputs": [
    {
     "name": "stderr",
     "output_type": "stream",
     "text": [
      "/home/fisadm/anaconda3/envs/detectron2/lib/python3.7/site-packages/pyecharts/charts/chart.py:14: PendingDeprecationWarning: pyecharts 所有图表类型将在 v1.9.0 版本开始强制使用 ChartItem 进行数据项配置 :)\n",
      "  super().__init__(init_opts=init_opts)\n"
     ]
    },
    {
     "data": {
      "text/html": [
       "\n",
       "<script>\n",
       "    require.config({\n",
       "        paths: {\n",
       "            'echarts':'https://assets.pyecharts.org/assets/echarts.min', 'echarts-gl':'https://assets.pyecharts.org/assets/echarts-gl.min', 'china':'https://assets.pyecharts.org/assets/maps/china'\n",
       "        }\n",
       "    });\n",
       "</script>\n",
       "\n",
       "        <div id=\"36888412d54e4d65a1253cf28c5bde85\" style=\"width:900px; height:500px;\"></div>\n",
       "\n",
       "<script>\n",
       "        require(['echarts', 'echarts-gl', 'china'], function(echarts) {\n",
       "                var chart_36888412d54e4d65a1253cf28c5bde85 = echarts.init(\n",
       "                    document.getElementById('36888412d54e4d65a1253cf28c5bde85'), 'white', {renderer: 'canvas'});\n",
       "                var option_36888412d54e4d65a1253cf28c5bde85 = {\n",
       "    \"animation\": true,\n",
       "    \"animationThreshold\": 2000,\n",
       "    \"animationDuration\": 1000,\n",
       "    \"animationEasing\": \"cubicOut\",\n",
       "    \"animationDelay\": 0,\n",
       "    \"animationDurationUpdate\": 300,\n",
       "    \"animationEasingUpdate\": \"cubicOut\",\n",
       "    \"animationDelayUpdate\": 0,\n",
       "    \"color\": [\n",
       "        \"#c23531\",\n",
       "        \"#2f4554\",\n",
       "        \"#61a0a8\",\n",
       "        \"#d48265\",\n",
       "        \"#749f83\",\n",
       "        \"#ca8622\",\n",
       "        \"#bda29a\",\n",
       "        \"#6e7074\",\n",
       "        \"#546570\",\n",
       "        \"#c4ccd3\",\n",
       "        \"#f05b72\",\n",
       "        \"#ef5b9c\",\n",
       "        \"#f47920\",\n",
       "        \"#905a3d\",\n",
       "        \"#fab27b\",\n",
       "        \"#2a5caa\",\n",
       "        \"#444693\",\n",
       "        \"#726930\",\n",
       "        \"#b2d235\",\n",
       "        \"#6d8346\",\n",
       "        \"#ac6767\",\n",
       "        \"#1d953f\",\n",
       "        \"#6950a1\",\n",
       "        \"#918597\"\n",
       "    ],\n",
       "    \"series\": [\n",
       "        {\n",
       "            \"type\": \"scatter3D\",\n",
       "            \"name\": \"Scatter3D\",\n",
       "            \"coordinateSystem\": \"geo3D\",\n",
       "            \"grid3DIndex\": 0,\n",
       "            \"geo3DIndex\": 0,\n",
       "            \"globeIndex\": 0,\n",
       "            \"symbol\": \"circle\",\n",
       "            \"symbolSize\": 10,\n",
       "            \"label\": {\n",
       "                \"show\": false,\n",
       "                \"position\": \"top\",\n",
       "                \"margin\": 8,\n",
       "                \"formatter\": function(data){return data.name + ' ' + data.value[2];}\n",
       "            },\n",
       "            \"emphasis\": {},\n",
       "            \"data\": [\n",
       "                {\n",
       "                    \"name\": \"\\u9ed1\\u9f99\\u6c5f\",\n",
       "                    \"value\": [\n",
       "                        127.9688,\n",
       "                        45.368,\n",
       "                        100\n",
       "                    ]\n",
       "                },\n",
       "                {\n",
       "                    \"name\": \"\\u5185\\u8499\\u53e4\",\n",
       "                    \"value\": [\n",
       "                        110.3467,\n",
       "                        41.4899,\n",
       "                        100\n",
       "                    ]\n",
       "                },\n",
       "                {\n",
       "                    \"name\": \"\\u5409\\u6797\",\n",
       "                    \"value\": [\n",
       "                        125.8154,\n",
       "                        44.2584,\n",
       "                        100\n",
       "                    ]\n",
       "                },\n",
       "                {\n",
       "                    \"name\": \"\\u8fbd\\u5b81\",\n",
       "                    \"value\": [\n",
       "                        123.1238,\n",
       "                        42.1216,\n",
       "                        100\n",
       "                    ]\n",
       "                },\n",
       "                {\n",
       "                    \"name\": \"\\u6cb3\\u5317\",\n",
       "                    \"value\": [\n",
       "                        114.4995,\n",
       "                        38.1006,\n",
       "                        100\n",
       "                    ]\n",
       "                },\n",
       "                {\n",
       "                    \"name\": \"\\u5929\\u6d25\",\n",
       "                    \"value\": [\n",
       "                        117.4219,\n",
       "                        39.4189,\n",
       "                        100\n",
       "                    ]\n",
       "                },\n",
       "                {\n",
       "                    \"name\": \"\\u5c71\\u897f\",\n",
       "                    \"value\": [\n",
       "                        112.3352,\n",
       "                        37.9413,\n",
       "                        100\n",
       "                    ]\n",
       "                },\n",
       "                {\n",
       "                    \"name\": \"\\u9655\\u897f\",\n",
       "                    \"value\": [\n",
       "                        109.1162,\n",
       "                        34.2004,\n",
       "                        100\n",
       "                    ]\n",
       "                },\n",
       "                {\n",
       "                    \"name\": \"\\u7518\\u8083\",\n",
       "                    \"value\": [\n",
       "                        103.5901,\n",
       "                        36.3043,\n",
       "                        100\n",
       "                    ]\n",
       "                },\n",
       "                {\n",
       "                    \"name\": \"\\u5b81\\u590f\",\n",
       "                    \"value\": [\n",
       "                        106.3586,\n",
       "                        38.1775,\n",
       "                        100\n",
       "                    ]\n",
       "                },\n",
       "                {\n",
       "                    \"name\": \"\\u9752\\u6d77\",\n",
       "                    \"value\": [\n",
       "                        101.4038,\n",
       "                        36.8207,\n",
       "                        100\n",
       "                    ]\n",
       "                },\n",
       "                {\n",
       "                    \"name\": \"\\u65b0\\u7586\",\n",
       "                    \"value\": [\n",
       "                        87.9236,\n",
       "                        43.5883,\n",
       "                        100\n",
       "                    ]\n",
       "                },\n",
       "                {\n",
       "                    \"name\": \"\\u897f\\u85cf\",\n",
       "                    \"value\": [\n",
       "                        91.11,\n",
       "                        29.97,\n",
       "                        100\n",
       "                    ]\n",
       "                },\n",
       "                {\n",
       "                    \"name\": \"\\u56db\\u5ddd\",\n",
       "                    \"value\": [\n",
       "                        103.9526,\n",
       "                        30.7617,\n",
       "                        100\n",
       "                    ]\n",
       "                },\n",
       "                {\n",
       "                    \"name\": \"\\u91cd\\u5e86\",\n",
       "                    \"value\": [\n",
       "                        108.384366,\n",
       "                        30.439702,\n",
       "                        100\n",
       "                    ]\n",
       "                },\n",
       "                {\n",
       "                    \"name\": \"\\u5c71\\u4e1c\",\n",
       "                    \"value\": [\n",
       "                        117.1582,\n",
       "                        36.8701,\n",
       "                        100\n",
       "                    ]\n",
       "                },\n",
       "                {\n",
       "                    \"name\": \"\\u6cb3\\u5357\",\n",
       "                    \"value\": [\n",
       "                        113.4668,\n",
       "                        34.6234,\n",
       "                        100\n",
       "                    ]\n",
       "                },\n",
       "                {\n",
       "                    \"name\": \"\\u6c5f\\u82cf\",\n",
       "                    \"value\": [\n",
       "                        118.8062,\n",
       "                        31.9208,\n",
       "                        100\n",
       "                    ]\n",
       "                },\n",
       "                {\n",
       "                    \"name\": \"\\u5b89\\u5fbd\",\n",
       "                    \"value\": [\n",
       "                        117.29,\n",
       "                        32.0581,\n",
       "                        100\n",
       "                    ]\n",
       "                },\n",
       "                {\n",
       "                    \"name\": \"\\u6e56\\u5317\",\n",
       "                    \"value\": [\n",
       "                        114.3896,\n",
       "                        30.6628,\n",
       "                        100\n",
       "                    ]\n",
       "                },\n",
       "                {\n",
       "                    \"name\": \"\\u6d59\\u6c5f\",\n",
       "                    \"value\": [\n",
       "                        119.5313,\n",
       "                        29.8773,\n",
       "                        100\n",
       "                    ]\n",
       "                },\n",
       "                {\n",
       "                    \"name\": \"\\u798f\\u5efa\",\n",
       "                    \"value\": [\n",
       "                        119.4543,\n",
       "                        25.9222,\n",
       "                        100\n",
       "                    ]\n",
       "                },\n",
       "                {\n",
       "                    \"name\": \"\\u6c5f\\u897f\",\n",
       "                    \"value\": [\n",
       "                        116.0046,\n",
       "                        28.6633,\n",
       "                        100\n",
       "                    ]\n",
       "                },\n",
       "                {\n",
       "                    \"name\": \"\\u6e56\\u5357\",\n",
       "                    \"value\": [\n",
       "                        113.0823,\n",
       "                        28.2568,\n",
       "                        100\n",
       "                    ]\n",
       "                },\n",
       "                {\n",
       "                    \"name\": \"\\u8d35\\u5dde\",\n",
       "                    \"value\": [\n",
       "                        106.6992,\n",
       "                        26.7682,\n",
       "                        100\n",
       "                    ]\n",
       "                },\n",
       "                {\n",
       "                    \"name\": \"\\u5e7f\\u897f\",\n",
       "                    \"value\": [\n",
       "                        108.479,\n",
       "                        23.1152,\n",
       "                        100\n",
       "                    ]\n",
       "                },\n",
       "                {\n",
       "                    \"name\": \"\\u6d77\\u5357\",\n",
       "                    \"value\": [\n",
       "                        110.3893,\n",
       "                        19.8516,\n",
       "                        100\n",
       "                    ]\n",
       "                },\n",
       "                {\n",
       "                    \"name\": \"\\u4e0a\\u6d77\",\n",
       "                    \"value\": [\n",
       "                        121.4648,\n",
       "                        31.2891,\n",
       "                        100\n",
       "                    ]\n",
       "                }\n",
       "            ],\n",
       "            \"blendMode\": \"source-over\",\n",
       "            \"zlevel\": -10,\n",
       "            \"silent\": false,\n",
       "            \"animation\": true,\n",
       "            \"animationDurationUpdate\": 100,\n",
       "            \"animationEasingUpdate\": \"cubicOut\"\n",
       "        }\n",
       "    ],\n",
       "    \"legend\": [\n",
       "        {\n",
       "            \"data\": [\n",
       "                \"Scatter3D\"\n",
       "            ],\n",
       "            \"selected\": {\n",
       "                \"Scatter3D\": true\n",
       "            },\n",
       "            \"show\": true,\n",
       "            \"padding\": 5,\n",
       "            \"itemGap\": 10,\n",
       "            \"itemWidth\": 25,\n",
       "            \"itemHeight\": 14\n",
       "        }\n",
       "    ],\n",
       "    \"tooltip\": {\n",
       "        \"show\": true,\n",
       "        \"trigger\": \"item\",\n",
       "        \"triggerOn\": \"mousemove|click\",\n",
       "        \"axisPointer\": {\n",
       "            \"type\": \"line\"\n",
       "        },\n",
       "        \"showContent\": true,\n",
       "        \"alwaysShowContent\": false,\n",
       "        \"showDelay\": 0,\n",
       "        \"hideDelay\": 100,\n",
       "        \"textStyle\": {\n",
       "            \"fontSize\": 14\n",
       "        },\n",
       "        \"borderWidth\": 0,\n",
       "        \"padding\": 5\n",
       "    },\n",
       "    \"geo3D\": {\n",
       "        \"map\": \"china\",\n",
       "        \"boxWidth\": 100,\n",
       "        \"boxHeight\": 10,\n",
       "        \"regionHeight\": 3,\n",
       "        \"groundPlane\": {\n",
       "            \"show\": false,\n",
       "            \"color\": \"#aaa\"\n",
       "        },\n",
       "        \"instancing\": false,\n",
       "        \"itemStyle\": {\n",
       "            \"color\": \"rgb(5,101,123)\",\n",
       "            \"borderColor\": \"rgb(62,215,213)\",\n",
       "            \"borderWidth\": 0.8,\n",
       "            \"opacity\": 1\n",
       "        },\n",
       "        \"label\": {\n",
       "            \"show\": false,\n",
       "            \"formatter\": function(data){return data.name +  + data.value[2];}\n",
       "        },\n",
       "        \"emphasis\": {\n",
       "            \"label\": {\n",
       "                \"show\": false,\n",
       "                \"position\": \"top\",\n",
       "                \"color\": \"#fff\",\n",
       "                \"margin\": 8,\n",
       "                \"fontSize\": 10,\n",
       "                \"backgroundColor\": \"rgba(0,23,11,0)\"\n",
       "            }\n",
       "        },\n",
       "        \"light\": {\n",
       "            \"main\": {\n",
       "                \"color\": \"#fff\",\n",
       "                \"intensity\": 1.2,\n",
       "                \"shadow\": false,\n",
       "                \"shadowQuality\": \"high\",\n",
       "                \"alpha\": 40,\n",
       "                \"beta\": 10\n",
       "            },\n",
       "            \"ambient\": {\n",
       "                \"color\": \"#fff\",\n",
       "                \"intensity\": 0.3\n",
       "            },\n",
       "            \"ambientCubemap\": {\n",
       "                \"diffuseIntensity\": 0.5,\n",
       "                \"specularIntensity\": 0.5\n",
       "            }\n",
       "        },\n",
       "        \"temporalSuperSampling\": {\n",
       "            \"enable\": \"auto\"\n",
       "        },\n",
       "        \"zlevel\": -10,\n",
       "        \"left\": \"auto\",\n",
       "        \"top\": \"auto\",\n",
       "        \"right\": \"auto\",\n",
       "        \"bottom\": \"auto\",\n",
       "        \"width\": \"auto\",\n",
       "        \"height\": \"auto\"\n",
       "    },\n",
       "    \"title\": [\n",
       "        {\n",
       "            \"text\": \"Map3D-Scatter3D\",\n",
       "            \"padding\": 5,\n",
       "            \"itemGap\": 10\n",
       "        }\n",
       "    ]\n",
       "};\n",
       "                chart_36888412d54e4d65a1253cf28c5bde85.setOption(option_36888412d54e4d65a1253cf28c5bde85);\n",
       "        });\n",
       "    </script>\n"
      ],
      "text/plain": [
       "<pyecharts.render.display.HTML at 0x7fbb885beb00>"
      ]
     },
     "execution_count": 1,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "from pyecharts import options as opts\n",
    "from pyecharts.charts import Map3D\n",
    "from pyecharts.globals import ChartType\n",
    "from pyecharts.commons.utils import JsCode\n",
    "\n",
    "example_data = [\n",
    "    (\"黑龙江\", [127.9688, 45.368, 100]),\n",
    "    (\"内蒙古\", [110.3467, 41.4899, 100]),\n",
    "    (\"吉林\", [125.8154, 44.2584, 100]),\n",
    "    (\"辽宁\", [123.1238, 42.1216, 100]),\n",
    "    (\"河北\", [114.4995, 38.1006, 100]),\n",
    "    (\"天津\", [117.4219, 39.4189, 100]),\n",
    "    (\"山西\", [112.3352, 37.9413, 100]),\n",
    "    (\"陕西\", [109.1162, 34.2004, 100]),\n",
    "    (\"甘肃\", [103.5901, 36.3043, 100]),\n",
    "    (\"宁夏\", [106.3586, 38.1775, 100]),\n",
    "    (\"青海\", [101.4038, 36.8207, 100]),\n",
    "    (\"新疆\", [87.9236, 43.5883, 100]),\n",
    "    (\"西藏\", [91.11, 29.97, 100]),\n",
    "    (\"四川\", [103.9526, 30.7617, 100]),\n",
    "    (\"重庆\", [108.384366, 30.439702, 100]),\n",
    "    (\"山东\", [117.1582, 36.8701, 100]),\n",
    "    (\"河南\", [113.4668, 34.6234, 100]),\n",
    "    (\"江苏\", [118.8062, 31.9208, 100]),\n",
    "    (\"安徽\", [117.29, 32.0581, 100]),\n",
    "    (\"湖北\", [114.3896, 30.6628, 100]),\n",
    "    (\"浙江\", [119.5313, 29.8773, 100]),\n",
    "    (\"福建\", [119.4543, 25.9222, 100]),\n",
    "    (\"江西\", [116.0046, 28.6633, 100]),\n",
    "    (\"湖南\", [113.0823, 28.2568, 100]),\n",
    "    (\"贵州\", [106.6992, 26.7682, 100]),\n",
    "    (\"广西\", [108.479, 23.1152, 100]),\n",
    "    (\"海南\", [110.3893, 19.8516, 100]),\n",
    "    (\"上海\", [121.4648, 31.2891, 100]),\n",
    "]\n",
    "\n",
    "c = (\n",
    "    Map3D()\n",
    "    .add_schema(\n",
    "        itemstyle_opts=opts.ItemStyleOpts(\n",
    "            color=\"rgb(5,101,123)\",\n",
    "            opacity=1,\n",
    "            border_width=0.8,\n",
    "            border_color=\"rgb(62,215,213)\",\n",
    "        ),\n",
    "        map3d_label=opts.Map3DLabelOpts(\n",
    "            is_show=False,\n",
    "            formatter=JsCode(\"function(data){return data.name + \" \" + data.value[2];}\"),\n",
    "        ),\n",
    "        emphasis_label_opts=opts.LabelOpts(\n",
    "            is_show=False,\n",
    "            color=\"#fff\",\n",
    "            font_size=10,\n",
    "            background_color=\"rgba(0,23,11,0)\",\n",
    "        ),\n",
    "        light_opts=opts.Map3DLightOpts(\n",
    "            main_color=\"#fff\",\n",
    "            main_intensity=1.2,\n",
    "            main_shadow_quality=\"high\",\n",
    "            is_main_shadow=False,\n",
    "            main_beta=10,\n",
    "            ambient_intensity=0.3,\n",
    "        ),\n",
    "    )\n",
    "    .add(\n",
    "        series_name=\"Scatter3D\",\n",
    "        data_pair=example_data,\n",
    "        type_=ChartType.SCATTER3D,\n",
    "        bar_size=1,\n",
    "        shading=\"lambert\",\n",
    "        label_opts=opts.LabelOpts(\n",
    "            is_show=False,\n",
    "            formatter=JsCode(\"function(data){return data.name + ' ' + data.value[2];}\"),\n",
    "        ),\n",
    "    )\n",
    "    .set_global_opts(title_opts=opts.TitleOpts(title=\"Map3D-Scatter3D\"))\n",
    "    #.render(\"map3d_with_scatter3d.html\")\n",
    ")\n",
    "c.load_javascript()\n",
    "c.render_notebook()"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 3,
   "metadata": {},
   "outputs": [
    {
     "name": "stderr",
     "output_type": "stream",
     "text": [
      "/home/fisadm/anaconda3/envs/detectron2/lib/python3.7/site-packages/pyecharts/charts/chart.py:14: PendingDeprecationWarning: pyecharts 所有图表类型将在 v1.9.0 版本开始强制使用 ChartItem 进行数据项配置 :)\n",
      "  super().__init__(init_opts=init_opts)\n"
     ]
    },
    {
     "data": {
      "text/html": [
       "<script>\n",
       "    require.config({\n",
       "        paths: {\n",
       "            'echarts':'https://assets.pyecharts.org/assets/echarts.min', 'echarts-gl':'https://assets.pyecharts.org/assets/echarts-gl.min', 'china':'https://assets.pyecharts.org/assets/maps/china', 'world':'https://assets.pyecharts.org/assets/maps/world'\n",
       "        }\n",
       "    });\n",
       "</script>\n",
       "\n",
       "    <div id=\"207a6cc912eb44f498cb26fdaea990ab\" style=\"width:900px; height:500px;\"></div>\n",
       "\n",
       "\n",
       "<script>\n",
       "    require(['echarts', 'echarts-gl', 'china', 'world'], function(echarts) {\n",
       "\t\tvar canvas_207a6cc912eb44f498cb26fdaea990ab = document.createElement('canvas');\n",
       "        var mapChart_207a6cc912eb44f498cb26fdaea990ab = echarts.init(\n",
       "\t    canvas_207a6cc912eb44f498cb26fdaea990ab, 'white', {width: 4096, height: 2048, renderer: 'canvas'});\n",
       "        var mapOption_207a6cc912eb44f498cb26fdaea990ab = {\n",
       "    \"animation\": true,\n",
       "    \"animationThreshold\": 2000,\n",
       "    \"animationDuration\": 1000,\n",
       "    \"animationEasing\": \"cubicOut\",\n",
       "    \"animationDelay\": 0,\n",
       "    \"animationDurationUpdate\": 300,\n",
       "    \"animationEasingUpdate\": \"cubicOut\",\n",
       "    \"animationDelayUpdate\": 0,\n",
       "    \"color\": [\n",
       "        \"#c23531\",\n",
       "        \"#2f4554\",\n",
       "        \"#61a0a8\",\n",
       "        \"#d48265\",\n",
       "        \"#749f83\",\n",
       "        \"#ca8622\",\n",
       "        \"#bda29a\",\n",
       "        \"#6e7074\",\n",
       "        \"#546570\",\n",
       "        \"#c4ccd3\",\n",
       "        \"#f05b72\",\n",
       "        \"#ef5b9c\",\n",
       "        \"#f47920\",\n",
       "        \"#905a3d\",\n",
       "        \"#fab27b\",\n",
       "        \"#2a5caa\",\n",
       "        \"#444693\",\n",
       "        \"#726930\",\n",
       "        \"#b2d235\",\n",
       "        \"#6d8346\",\n",
       "        \"#ac6767\",\n",
       "        \"#1d953f\",\n",
       "        \"#6950a1\",\n",
       "        \"#918597\"\n",
       "    ],\n",
       "    \"series\": [\n",
       "        {\n",
       "            \"type\": \"map\",\n",
       "            \"name\": \"World Population\",\n",
       "            \"label\": {\n",
       "                \"show\": false,\n",
       "                \"position\": \"top\",\n",
       "                \"margin\": 8\n",
       "            },\n",
       "            \"mapType\": \"world\",\n",
       "            \"data\": [\n",
       "                {\n",
       "                    \"name\": \"China\",\n",
       "                    \"value\": 1420062022\n",
       "                },\n",
       "                {\n",
       "                    \"name\": \"India\",\n",
       "                    \"value\": 1368737513\n",
       "                },\n",
       "                {\n",
       "                    \"name\": \"United States\",\n",
       "                    \"value\": 329093110\n",
       "                },\n",
       "                {\n",
       "                    \"name\": \"Indonesia\",\n",
       "                    \"value\": 269536482\n",
       "                },\n",
       "                {\n",
       "                    \"name\": \"Brazil\",\n",
       "                    \"value\": 212392717\n",
       "                },\n",
       "                {\n",
       "                    \"name\": \"Pakistan\",\n",
       "                    \"value\": 204596442\n",
       "                },\n",
       "                {\n",
       "                    \"name\": \"Nigeria\",\n",
       "                    \"value\": 200962417\n",
       "                },\n",
       "                {\n",
       "                    \"name\": \"Bangladesh\",\n",
       "                    \"value\": 168065920\n",
       "                },\n",
       "                {\n",
       "                    \"name\": \"Russia\",\n",
       "                    \"value\": 143895551\n",
       "                },\n",
       "                {\n",
       "                    \"name\": \"Mexico\",\n",
       "                    \"value\": 132328035\n",
       "                },\n",
       "                {\n",
       "                    \"name\": \"Japan\",\n",
       "                    \"value\": 126854745\n",
       "                },\n",
       "                {\n",
       "                    \"name\": \"Ethiopia\",\n",
       "                    \"value\": 110135635\n",
       "                },\n",
       "                {\n",
       "                    \"name\": \"Philippines\",\n",
       "                    \"value\": 108106310\n",
       "                },\n",
       "                {\n",
       "                    \"name\": \"Egypt\",\n",
       "                    \"value\": 101168745\n",
       "                },\n",
       "                {\n",
       "                    \"name\": \"Vietnam\",\n",
       "                    \"value\": 97429061\n",
       "                },\n",
       "                {\n",
       "                    \"name\": \"DR Congo\",\n",
       "                    \"value\": 86727573\n",
       "                },\n",
       "                {\n",
       "                    \"name\": \"Turkey\",\n",
       "                    \"value\": 82961805\n",
       "                },\n",
       "                {\n",
       "                    \"name\": \"Iran\",\n",
       "                    \"value\": 82820766\n",
       "                },\n",
       "                {\n",
       "                    \"name\": \"Germany\",\n",
       "                    \"value\": 82438639\n",
       "                },\n",
       "                {\n",
       "                    \"name\": \"Thailand\",\n",
       "                    \"value\": 69306160\n",
       "                },\n",
       "                {\n",
       "                    \"name\": \"United Kingdom\",\n",
       "                    \"value\": 66959016\n",
       "                },\n",
       "                {\n",
       "                    \"name\": \"France\",\n",
       "                    \"value\": 65480710\n",
       "                },\n",
       "                {\n",
       "                    \"name\": \"Tanzania\",\n",
       "                    \"value\": 60913557\n",
       "                },\n",
       "                {\n",
       "                    \"name\": \"Italy\",\n",
       "                    \"value\": 59216525\n",
       "                },\n",
       "                {\n",
       "                    \"name\": \"South Africa\",\n",
       "                    \"value\": 58065097\n",
       "                },\n",
       "                {\n",
       "                    \"name\": \"Myanmar\",\n",
       "                    \"value\": 54336138\n",
       "                },\n",
       "                {\n",
       "                    \"name\": \"Kenya\",\n",
       "                    \"value\": 52214791\n",
       "                },\n",
       "                {\n",
       "                    \"name\": \"South Korea\",\n",
       "                    \"value\": 51339238\n",
       "                },\n",
       "                {\n",
       "                    \"name\": \"Colombia\",\n",
       "                    \"value\": 49849818\n",
       "                },\n",
       "                {\n",
       "                    \"name\": \"Spain\",\n",
       "                    \"value\": 46441049\n",
       "                },\n",
       "                {\n",
       "                    \"name\": \"Uganda\",\n",
       "                    \"value\": 45711874\n",
       "                },\n",
       "                {\n",
       "                    \"name\": \"Argentina\",\n",
       "                    \"value\": 45101781\n",
       "                },\n",
       "                {\n",
       "                    \"name\": \"Ukraine\",\n",
       "                    \"value\": 43795220\n",
       "                },\n",
       "                {\n",
       "                    \"name\": \"Algeria\",\n",
       "                    \"value\": 42679018\n",
       "                },\n",
       "                {\n",
       "                    \"name\": \"Sudan\",\n",
       "                    \"value\": 42514094\n",
       "                },\n",
       "                {\n",
       "                    \"name\": \"Iraq\",\n",
       "                    \"value\": 40412299\n",
       "                },\n",
       "                {\n",
       "                    \"name\": \"Poland\",\n",
       "                    \"value\": 38028278\n",
       "                },\n",
       "                {\n",
       "                    \"name\": \"Canada\",\n",
       "                    \"value\": 37279811\n",
       "                },\n",
       "                {\n",
       "                    \"name\": \"Afghanistan\",\n",
       "                    \"value\": 37209007\n",
       "                },\n",
       "                {\n",
       "                    \"name\": \"Morocco\",\n",
       "                    \"value\": 36635156\n",
       "                },\n",
       "                {\n",
       "                    \"name\": \"Saudi Arabia\",\n",
       "                    \"value\": 34140662\n",
       "                },\n",
       "                {\n",
       "                    \"name\": \"Peru\",\n",
       "                    \"value\": 32933835\n",
       "                },\n",
       "                {\n",
       "                    \"name\": \"Uzbekistan\",\n",
       "                    \"value\": 32807368\n",
       "                },\n",
       "                {\n",
       "                    \"name\": \"Venezuela\",\n",
       "                    \"value\": 32779868\n",
       "                },\n",
       "                {\n",
       "                    \"name\": \"Malaysia\",\n",
       "                    \"value\": 32454455\n",
       "                },\n",
       "                {\n",
       "                    \"name\": \"Angola\",\n",
       "                    \"value\": 31787566\n",
       "                },\n",
       "                {\n",
       "                    \"name\": \"Mozambique\",\n",
       "                    \"value\": 31408823\n",
       "                },\n",
       "                {\n",
       "                    \"name\": \"Ghana\",\n",
       "                    \"value\": 30096970\n",
       "                },\n",
       "                {\n",
       "                    \"name\": \"Nepal\",\n",
       "                    \"value\": 29942018\n",
       "                },\n",
       "                {\n",
       "                    \"name\": \"Yemen\",\n",
       "                    \"value\": 29579986\n",
       "                },\n",
       "                {\n",
       "                    \"name\": \"Madagascar\",\n",
       "                    \"value\": 26969642\n",
       "                },\n",
       "                {\n",
       "                    \"name\": \"North Korea\",\n",
       "                    \"value\": 25727408\n",
       "                },\n",
       "                {\n",
       "                    \"name\": \"C\\u00f4te d'Ivoire\",\n",
       "                    \"value\": 25531083\n",
       "                },\n",
       "                {\n",
       "                    \"name\": \"Cameroon\",\n",
       "                    \"value\": 25312993\n",
       "                },\n",
       "                {\n",
       "                    \"name\": \"Australia\",\n",
       "                    \"value\": 25088636\n",
       "                },\n",
       "                {\n",
       "                    \"name\": \"Taiwan\",\n",
       "                    \"value\": 23758247\n",
       "                },\n",
       "                {\n",
       "                    \"name\": \"Niger\",\n",
       "                    \"value\": 23176691\n",
       "                },\n",
       "                {\n",
       "                    \"name\": \"Sri Lanka\",\n",
       "                    \"value\": 21018859\n",
       "                },\n",
       "                {\n",
       "                    \"name\": \"Burkina Faso\",\n",
       "                    \"value\": 20321560\n",
       "                },\n",
       "                {\n",
       "                    \"name\": \"Malawi\",\n",
       "                    \"value\": 19718743\n",
       "                },\n",
       "                {\n",
       "                    \"name\": \"Mali\",\n",
       "                    \"value\": 19689140\n",
       "                },\n",
       "                {\n",
       "                    \"name\": \"Romania\",\n",
       "                    \"value\": 19483360\n",
       "                },\n",
       "                {\n",
       "                    \"name\": \"Kazakhstan\",\n",
       "                    \"value\": 18592970\n",
       "                },\n",
       "                {\n",
       "                    \"name\": \"Syria\",\n",
       "                    \"value\": 18499181\n",
       "                },\n",
       "                {\n",
       "                    \"name\": \"Chile\",\n",
       "                    \"value\": 18336653\n",
       "                },\n",
       "                {\n",
       "                    \"name\": \"Zambia\",\n",
       "                    \"value\": 18137369\n",
       "                },\n",
       "                {\n",
       "                    \"name\": \"Guatemala\",\n",
       "                    \"value\": 17577842\n",
       "                },\n",
       "                {\n",
       "                    \"name\": \"Zimbabwe\",\n",
       "                    \"value\": 17297495\n",
       "                },\n",
       "                {\n",
       "                    \"name\": \"Netherlands\",\n",
       "                    \"value\": 17132908\n",
       "                },\n",
       "                {\n",
       "                    \"name\": \"Ecuador\",\n",
       "                    \"value\": 17100444\n",
       "                },\n",
       "                {\n",
       "                    \"name\": \"Senegal\",\n",
       "                    \"value\": 16743859\n",
       "                },\n",
       "                {\n",
       "                    \"name\": \"Cambodia\",\n",
       "                    \"value\": 16482646\n",
       "                },\n",
       "                {\n",
       "                    \"name\": \"Chad\",\n",
       "                    \"value\": 15814345\n",
       "                },\n",
       "                {\n",
       "                    \"name\": \"Somalia\",\n",
       "                    \"value\": 15636171\n",
       "                },\n",
       "                {\n",
       "                    \"name\": \"Guinea\",\n",
       "                    \"value\": 13398180\n",
       "                },\n",
       "                {\n",
       "                    \"name\": \"South Sudan\",\n",
       "                    \"value\": 13263184\n",
       "                },\n",
       "                {\n",
       "                    \"name\": \"Rwanda\",\n",
       "                    \"value\": 12794412\n",
       "                },\n",
       "                {\n",
       "                    \"name\": \"Benin\",\n",
       "                    \"value\": 11801595\n",
       "                },\n",
       "                {\n",
       "                    \"name\": \"Tunisia\",\n",
       "                    \"value\": 11783168\n",
       "                },\n",
       "                {\n",
       "                    \"name\": \"Burundi\",\n",
       "                    \"value\": 11575964\n",
       "                },\n",
       "                {\n",
       "                    \"name\": \"Belgium\",\n",
       "                    \"value\": 11562784\n",
       "                },\n",
       "                {\n",
       "                    \"name\": \"Cuba\",\n",
       "                    \"value\": 11492046\n",
       "                },\n",
       "                {\n",
       "                    \"name\": \"Bolivia\",\n",
       "                    \"value\": 11379861\n",
       "                },\n",
       "                {\n",
       "                    \"name\": \"Haiti\",\n",
       "                    \"value\": 11242856\n",
       "                },\n",
       "                {\n",
       "                    \"name\": \"Greece\",\n",
       "                    \"value\": 11124603\n",
       "                },\n",
       "                {\n",
       "                    \"name\": \"Dominican Republic\",\n",
       "                    \"value\": 10996774\n",
       "                },\n",
       "                {\n",
       "                    \"name\": \"Czechia\",\n",
       "                    \"value\": 10630589\n",
       "                },\n",
       "                {\n",
       "                    \"name\": \"Portugal\",\n",
       "                    \"value\": 10254666\n",
       "                },\n",
       "                {\n",
       "                    \"name\": \"Jordan\",\n",
       "                    \"value\": 10069794\n",
       "                },\n",
       "                {\n",
       "                    \"name\": \"Sweden\",\n",
       "                    \"value\": 10053135\n",
       "                },\n",
       "                {\n",
       "                    \"name\": \"Azerbaijan\",\n",
       "                    \"value\": 10014575\n",
       "                },\n",
       "                {\n",
       "                    \"name\": \"United Arab Emirates\",\n",
       "                    \"value\": 9682088\n",
       "                },\n",
       "                {\n",
       "                    \"name\": \"Hungary\",\n",
       "                    \"value\": 9655361\n",
       "                },\n",
       "                {\n",
       "                    \"name\": \"Honduras\",\n",
       "                    \"value\": 9568688\n",
       "                },\n",
       "                {\n",
       "                    \"name\": \"Belarus\",\n",
       "                    \"value\": 9433874\n",
       "                },\n",
       "                {\n",
       "                    \"name\": \"Tajikistan\",\n",
       "                    \"value\": 9292000\n",
       "                },\n",
       "                {\n",
       "                    \"name\": \"Austria\",\n",
       "                    \"value\": 8766201\n",
       "                },\n",
       "                {\n",
       "                    \"name\": \"Serbia\",\n",
       "                    \"value\": 8733407\n",
       "                },\n",
       "                {\n",
       "                    \"name\": \"Switzerland\",\n",
       "                    \"value\": 8608259\n",
       "                },\n",
       "                {\n",
       "                    \"name\": \"Papua New Guinea\",\n",
       "                    \"value\": 8586525\n",
       "                },\n",
       "                {\n",
       "                    \"name\": \"Israel\",\n",
       "                    \"value\": 8583916\n",
       "                },\n",
       "                {\n",
       "                    \"name\": \"Togo\",\n",
       "                    \"value\": 8186384\n",
       "                },\n",
       "                {\n",
       "                    \"name\": \"Sierra Leone\",\n",
       "                    \"value\": 7883123\n",
       "                },\n",
       "                {\n",
       "                    \"name\": \"Hong Kong\",\n",
       "                    \"value\": 7490776\n",
       "                },\n",
       "                {\n",
       "                    \"name\": \"Laos\",\n",
       "                    \"value\": 7064242\n",
       "                },\n",
       "                {\n",
       "                    \"name\": \"Bulgaria\",\n",
       "                    \"value\": 6988739\n",
       "                },\n",
       "                {\n",
       "                    \"name\": \"Paraguay\",\n",
       "                    \"value\": 6981981\n",
       "                },\n",
       "                {\n",
       "                    \"name\": \"Libya\",\n",
       "                    \"value\": 6569864\n",
       "                },\n",
       "                {\n",
       "                    \"name\": \"El Salvador\",\n",
       "                    \"value\": 6445405\n",
       "                },\n",
       "                {\n",
       "                    \"name\": \"Nicaragua\",\n",
       "                    \"value\": 6351157\n",
       "                },\n",
       "                {\n",
       "                    \"name\": \"Kyrgyzstan\",\n",
       "                    \"value\": 6218616\n",
       "                },\n",
       "                {\n",
       "                    \"name\": \"Lebanon\",\n",
       "                    \"value\": 6065922\n",
       "                },\n",
       "                {\n",
       "                    \"name\": \"Turkmenistan\",\n",
       "                    \"value\": 5942561\n",
       "                },\n",
       "                {\n",
       "                    \"name\": \"Singapore\",\n",
       "                    \"value\": 5868104\n",
       "                },\n",
       "                {\n",
       "                    \"name\": \"Denmark\",\n",
       "                    \"value\": 5775224\n",
       "                },\n",
       "                {\n",
       "                    \"name\": \"Finland\",\n",
       "                    \"value\": 5561389\n",
       "                },\n",
       "                {\n",
       "                    \"name\": \"Congo\",\n",
       "                    \"value\": 5542197\n",
       "                },\n",
       "                {\n",
       "                    \"name\": \"Slovakia\",\n",
       "                    \"value\": 5450987\n",
       "                },\n",
       "                {\n",
       "                    \"name\": \"Norway\",\n",
       "                    \"value\": 5400916\n",
       "                },\n",
       "                {\n",
       "                    \"name\": \"Eritrea\",\n",
       "                    \"value\": 5309659\n",
       "                },\n",
       "                {\n",
       "                    \"name\": \"State of Palestine\",\n",
       "                    \"value\": 5186790\n",
       "                },\n",
       "                {\n",
       "                    \"name\": \"Oman\",\n",
       "                    \"value\": 5001875\n",
       "                },\n",
       "                {\n",
       "                    \"name\": \"Costa Rica\",\n",
       "                    \"value\": 4999384\n",
       "                },\n",
       "                {\n",
       "                    \"name\": \"Liberia\",\n",
       "                    \"value\": 4977720\n",
       "                },\n",
       "                {\n",
       "                    \"name\": \"Ireland\",\n",
       "                    \"value\": 4847139\n",
       "                },\n",
       "                {\n",
       "                    \"name\": \"Central African Republic\",\n",
       "                    \"value\": 4825711\n",
       "                },\n",
       "                {\n",
       "                    \"name\": \"New Zealand\",\n",
       "                    \"value\": 4792409\n",
       "                },\n",
       "                {\n",
       "                    \"name\": \"Mauritania\",\n",
       "                    \"value\": 4661149\n",
       "                },\n",
       "                {\n",
       "                    \"name\": \"Kuwait\",\n",
       "                    \"value\": 4248974\n",
       "                },\n",
       "                {\n",
       "                    \"name\": \"Panama\",\n",
       "                    \"value\": 4226197\n",
       "                },\n",
       "                {\n",
       "                    \"name\": \"Croatia\",\n",
       "                    \"value\": 4140148\n",
       "                },\n",
       "                {\n",
       "                    \"name\": \"Moldova\",\n",
       "                    \"value\": 4029750\n",
       "                },\n",
       "                {\n",
       "                    \"name\": \"Georgia\",\n",
       "                    \"value\": 3904204\n",
       "                },\n",
       "                {\n",
       "                    \"name\": \"Puerto Rico\",\n",
       "                    \"value\": 3654978\n",
       "                },\n",
       "                {\n",
       "                    \"name\": \"Bosnia and Herzegovina\",\n",
       "                    \"value\": 3501774\n",
       "                },\n",
       "                {\n",
       "                    \"name\": \"Uruguay\",\n",
       "                    \"value\": 3482156\n",
       "                },\n",
       "                {\n",
       "                    \"name\": \"Mongolia\",\n",
       "                    \"value\": 3166244\n",
       "                },\n",
       "                {\n",
       "                    \"name\": \"Albania\",\n",
       "                    \"value\": 2938428\n",
       "                },\n",
       "                {\n",
       "                    \"name\": \"Armenia\",\n",
       "                    \"value\": 2936706\n",
       "                },\n",
       "                {\n",
       "                    \"name\": \"Jamaica\",\n",
       "                    \"value\": 2906339\n",
       "                },\n",
       "                {\n",
       "                    \"name\": \"Lithuania\",\n",
       "                    \"value\": 2864459\n",
       "                },\n",
       "                {\n",
       "                    \"name\": \"Qatar\",\n",
       "                    \"value\": 2743901\n",
       "                },\n",
       "                {\n",
       "                    \"name\": \"Namibia\",\n",
       "                    \"value\": 2641996\n",
       "                },\n",
       "                {\n",
       "                    \"name\": \"Botswana\",\n",
       "                    \"value\": 2374636\n",
       "                },\n",
       "                {\n",
       "                    \"name\": \"Lesotho\",\n",
       "                    \"value\": 2292682\n",
       "                },\n",
       "                {\n",
       "                    \"name\": \"Gambia\",\n",
       "                    \"value\": 2228075\n",
       "                },\n",
       "                {\n",
       "                    \"name\": \"Gabon\",\n",
       "                    \"value\": 2109099\n",
       "                },\n",
       "                {\n",
       "                    \"name\": \"North Macedonia\",\n",
       "                    \"value\": 2086720\n",
       "                },\n",
       "                {\n",
       "                    \"name\": \"Slovenia\",\n",
       "                    \"value\": 2081900\n",
       "                },\n",
       "                {\n",
       "                    \"name\": \"Guinea-Bissau\",\n",
       "                    \"value\": 1953723\n",
       "                },\n",
       "                {\n",
       "                    \"name\": \"Latvia\",\n",
       "                    \"value\": 1911108\n",
       "                },\n",
       "                {\n",
       "                    \"name\": \"Bahrain\",\n",
       "                    \"value\": 1637896\n",
       "                },\n",
       "                {\n",
       "                    \"name\": \"Swaziland\",\n",
       "                    \"value\": 1415414\n",
       "                },\n",
       "                {\n",
       "                    \"name\": \"Trinidad and Tobago\",\n",
       "                    \"value\": 1375443\n",
       "                },\n",
       "                {\n",
       "                    \"name\": \"Equatorial Guinea\",\n",
       "                    \"value\": 1360104\n",
       "                },\n",
       "                {\n",
       "                    \"name\": \"Timor-Leste\",\n",
       "                    \"value\": 1352360\n",
       "                },\n",
       "                {\n",
       "                    \"name\": \"Estonia\",\n",
       "                    \"value\": 1303798\n",
       "                },\n",
       "                {\n",
       "                    \"name\": \"Mauritius\",\n",
       "                    \"value\": 1271368\n",
       "                },\n",
       "                {\n",
       "                    \"name\": \"Cyprus\",\n",
       "                    \"value\": 1198427\n",
       "                },\n",
       "                {\n",
       "                    \"name\": \"Djibouti\",\n",
       "                    \"value\": 985690\n",
       "                },\n",
       "                {\n",
       "                    \"name\": \"Fiji\",\n",
       "                    \"value\": 918757\n",
       "                },\n",
       "                {\n",
       "                    \"name\": \"R\\u00e9union\",\n",
       "                    \"value\": 889918\n",
       "                },\n",
       "                {\n",
       "                    \"name\": \"Comoros\",\n",
       "                    \"value\": 850910\n",
       "                },\n",
       "                {\n",
       "                    \"name\": \"Bhutan\",\n",
       "                    \"value\": 826229\n",
       "                },\n",
       "                {\n",
       "                    \"name\": \"Guyana\",\n",
       "                    \"value\": 786508\n",
       "                },\n",
       "                {\n",
       "                    \"name\": \"Macao\",\n",
       "                    \"value\": 642090\n",
       "                },\n",
       "                {\n",
       "                    \"name\": \"Solomon Islands\",\n",
       "                    \"value\": 635254\n",
       "                },\n",
       "                {\n",
       "                    \"name\": \"Montenegro\",\n",
       "                    \"value\": 629355\n",
       "                },\n",
       "                {\n",
       "                    \"name\": \"Luxembourg\",\n",
       "                    \"value\": 596992\n",
       "                },\n",
       "                {\n",
       "                    \"name\": \"Western Sahara\",\n",
       "                    \"value\": 582478\n",
       "                },\n",
       "                {\n",
       "                    \"name\": \"Suriname\",\n",
       "                    \"value\": 573085\n",
       "                },\n",
       "                {\n",
       "                    \"name\": \"Cabo Verde\",\n",
       "                    \"value\": 560349\n",
       "                },\n",
       "                {\n",
       "                    \"name\": \"Micronesia\",\n",
       "                    \"value\": 536579\n",
       "                },\n",
       "                {\n",
       "                    \"name\": \"Maldives\",\n",
       "                    \"value\": 451738\n",
       "                },\n",
       "                {\n",
       "                    \"name\": \"Guadeloupe\",\n",
       "                    \"value\": 448798\n",
       "                },\n",
       "                {\n",
       "                    \"name\": \"Brunei\",\n",
       "                    \"value\": 439336\n",
       "                },\n",
       "                {\n",
       "                    \"name\": \"Malta\",\n",
       "                    \"value\": 433245\n",
       "                },\n",
       "                {\n",
       "                    \"name\": \"Bahamas\",\n",
       "                    \"value\": 403095\n",
       "                },\n",
       "                {\n",
       "                    \"name\": \"Belize\",\n",
       "                    \"value\": 390231\n",
       "                },\n",
       "                {\n",
       "                    \"name\": \"Martinique\",\n",
       "                    \"value\": 385320\n",
       "                },\n",
       "                {\n",
       "                    \"name\": \"Iceland\",\n",
       "                    \"value\": 340566\n",
       "                },\n",
       "                {\n",
       "                    \"name\": \"French Guiana\",\n",
       "                    \"value\": 296847\n",
       "                },\n",
       "                {\n",
       "                    \"name\": \"French Polynesia\",\n",
       "                    \"value\": 288506\n",
       "                },\n",
       "                {\n",
       "                    \"name\": \"Vanuatu\",\n",
       "                    \"value\": 288017\n",
       "                },\n",
       "                {\n",
       "                    \"name\": \"Barbados\",\n",
       "                    \"value\": 287010\n",
       "                },\n",
       "                {\n",
       "                    \"name\": \"New Caledonia\",\n",
       "                    \"value\": 283376\n",
       "                },\n",
       "                {\n",
       "                    \"name\": \"Mayotte\",\n",
       "                    \"value\": 266380\n",
       "                },\n",
       "                {\n",
       "                    \"name\": \"Sao Tome & Principe\",\n",
       "                    \"value\": 213379\n",
       "                },\n",
       "                {\n",
       "                    \"name\": \"Samoa\",\n",
       "                    \"value\": 198909\n",
       "                },\n",
       "                {\n",
       "                    \"name\": \"Saint Lucia\",\n",
       "                    \"value\": 180454\n",
       "                },\n",
       "                {\n",
       "                    \"name\": \"Guam\",\n",
       "                    \"value\": 167245\n",
       "                },\n",
       "                {\n",
       "                    \"name\": \"Channel Islands\",\n",
       "                    \"value\": 166828\n",
       "                },\n",
       "                {\n",
       "                    \"name\": \"Cura\\u00e7ao\",\n",
       "                    \"value\": 162547\n",
       "                },\n",
       "                {\n",
       "                    \"name\": \"Kiribati\",\n",
       "                    \"value\": 120428\n",
       "                },\n",
       "                {\n",
       "                    \"name\": \"St. Vincent & Grenadines\",\n",
       "                    \"value\": 110488\n",
       "                },\n",
       "                {\n",
       "                    \"name\": \"Tonga\",\n",
       "                    \"value\": 110041\n",
       "                },\n",
       "                {\n",
       "                    \"name\": \"Grenada\",\n",
       "                    \"value\": 108825\n",
       "                },\n",
       "                {\n",
       "                    \"name\": \"Aruba\",\n",
       "                    \"value\": 106053\n",
       "                },\n",
       "                {\n",
       "                    \"name\": \"U.S. Virgin Islands\",\n",
       "                    \"value\": 104909\n",
       "                },\n",
       "                {\n",
       "                    \"name\": \"Antigua and Barbuda\",\n",
       "                    \"value\": 104084\n",
       "                },\n",
       "                {\n",
       "                    \"name\": \"Seychelles\",\n",
       "                    \"value\": 95702\n",
       "                },\n",
       "                {\n",
       "                    \"name\": \"Isle of Man\",\n",
       "                    \"value\": 85369\n",
       "                },\n",
       "                {\n",
       "                    \"name\": \"Andorra\",\n",
       "                    \"value\": 77072\n",
       "                },\n",
       "                {\n",
       "                    \"name\": \"Dominica\",\n",
       "                    \"value\": 74679\n",
       "                },\n",
       "                {\n",
       "                    \"name\": \"Cayman Islands\",\n",
       "                    \"value\": 63129\n",
       "                },\n",
       "                {\n",
       "                    \"name\": \"Bermuda\",\n",
       "                    \"value\": 60833\n",
       "                },\n",
       "                {\n",
       "                    \"name\": \"Greenland\",\n",
       "                    \"value\": 56673\n",
       "                },\n",
       "                {\n",
       "                    \"name\": \"Saint Kitts & Nevis\",\n",
       "                    \"value\": 56345\n",
       "                },\n",
       "                {\n",
       "                    \"name\": \"American Samoa\",\n",
       "                    \"value\": 55727\n",
       "                },\n",
       "                {\n",
       "                    \"name\": \"Northern Mariana Islands\",\n",
       "                    \"value\": 55246\n",
       "                },\n",
       "                {\n",
       "                    \"name\": \"Marshall Islands\",\n",
       "                    \"value\": 53211\n",
       "                },\n",
       "                {\n",
       "                    \"name\": \"Faeroe Islands\",\n",
       "                    \"value\": 49692\n",
       "                },\n",
       "                {\n",
       "                    \"name\": \"Sint Maarten\",\n",
       "                    \"value\": 40939\n",
       "                },\n",
       "                {\n",
       "                    \"name\": \"Monaco\",\n",
       "                    \"value\": 39102\n",
       "                },\n",
       "                {\n",
       "                    \"name\": \"Liechtenstein\",\n",
       "                    \"value\": 38404\n",
       "                },\n",
       "                {\n",
       "                    \"name\": \"Turks and Caicos\",\n",
       "                    \"value\": 36461\n",
       "                },\n",
       "                {\n",
       "                    \"name\": \"Gibraltar\",\n",
       "                    \"value\": 34879\n",
       "                },\n",
       "                {\n",
       "                    \"name\": \"San Marino\",\n",
       "                    \"value\": 33683\n",
       "                },\n",
       "                {\n",
       "                    \"name\": \"British Virgin Islands\",\n",
       "                    \"value\": 32206\n",
       "                },\n",
       "                {\n",
       "                    \"name\": \"Caribbean Netherlands\",\n",
       "                    \"value\": 25971\n",
       "                },\n",
       "                {\n",
       "                    \"name\": \"Palau\",\n",
       "                    \"value\": 22206\n",
       "                },\n",
       "                {\n",
       "                    \"name\": \"Cook Islands\",\n",
       "                    \"value\": 17462\n",
       "                },\n",
       "                {\n",
       "                    \"name\": \"Anguilla\",\n",
       "                    \"value\": 15174\n",
       "                },\n",
       "                {\n",
       "                    \"name\": \"Wallis & Futuna\",\n",
       "                    \"value\": 11617\n",
       "                },\n",
       "                {\n",
       "                    \"name\": \"Tuvalu\",\n",
       "                    \"value\": 11393\n",
       "                },\n",
       "                {\n",
       "                    \"name\": \"Nauru\",\n",
       "                    \"value\": 11260\n",
       "                },\n",
       "                {\n",
       "                    \"name\": \"Saint Pierre & Miquelon\",\n",
       "                    \"value\": 6375\n",
       "                },\n",
       "                {\n",
       "                    \"name\": \"Montserrat\",\n",
       "                    \"value\": 5220\n",
       "                },\n",
       "                {\n",
       "                    \"name\": \"Saint Helena\",\n",
       "                    \"value\": 4096\n",
       "                },\n",
       "                {\n",
       "                    \"name\": \"Falkland Islands\",\n",
       "                    \"value\": 2921\n",
       "                },\n",
       "                {\n",
       "                    \"name\": \"Niue\",\n",
       "                    \"value\": 1628\n",
       "                },\n",
       "                {\n",
       "                    \"name\": \"Tokelau\",\n",
       "                    \"value\": 1340\n",
       "                },\n",
       "                {\n",
       "                    \"name\": \"Holy See\",\n",
       "                    \"value\": 799\n",
       "                }\n",
       "            ],\n",
       "            \"roam\": true,\n",
       "            \"zoom\": 1,\n",
       "            \"showLegendSymbol\": false,\n",
       "            \"emphasis\": {}\n",
       "        }\n",
       "    ],\n",
       "    \"legend\": [\n",
       "        {\n",
       "            \"data\": [\n",
       "                \"World Population\"\n",
       "            ],\n",
       "            \"selected\": {\n",
       "                \"World Population\": true\n",
       "            },\n",
       "            \"show\": true,\n",
       "            \"padding\": 5,\n",
       "            \"itemGap\": 10,\n",
       "            \"itemWidth\": 25,\n",
       "            \"itemHeight\": 14\n",
       "        }\n",
       "    ],\n",
       "    \"tooltip\": {\n",
       "        \"show\": true,\n",
       "        \"trigger\": \"item\",\n",
       "        \"triggerOn\": \"mousemove|click\",\n",
       "        \"axisPointer\": {\n",
       "            \"type\": \"line\"\n",
       "        },\n",
       "        \"showContent\": true,\n",
       "        \"alwaysShowContent\": false,\n",
       "        \"showDelay\": 0,\n",
       "        \"hideDelay\": 100,\n",
       "        \"textStyle\": {\n",
       "            \"fontSize\": 14\n",
       "        },\n",
       "        \"borderWidth\": 0,\n",
       "        \"padding\": 5\n",
       "    },\n",
       "    \"visualMap\": {\n",
       "        \"show\": true,\n",
       "        \"type\": \"continuous\",\n",
       "        \"min\": 799,\n",
       "        \"max\": 1420062022,\n",
       "        \"text\": [\n",
       "            \"max\",\n",
       "            \"min\"\n",
       "        ],\n",
       "        \"inRange\": {\n",
       "            \"color\": [\n",
       "                \"lightskyblue\",\n",
       "                \"yellow\",\n",
       "                \"orangered\"\n",
       "            ]\n",
       "        },\n",
       "        \"calculable\": true,\n",
       "        \"inverse\": false,\n",
       "        \"splitNumber\": 5,\n",
       "        \"orient\": \"vertical\",\n",
       "        \"showLabel\": true,\n",
       "        \"itemWidth\": 20,\n",
       "        \"itemHeight\": 140,\n",
       "        \"borderWidth\": 0\n",
       "    },\n",
       "    \"title\": [\n",
       "        {\n",
       "            \"padding\": 5,\n",
       "            \"itemGap\": 10\n",
       "        }\n",
       "    ]\n",
       "};\n",
       "        mapChart_207a6cc912eb44f498cb26fdaea990ab.setOption(mapOption_207a6cc912eb44f498cb26fdaea990ab);\n",
       "    \tvar chart_207a6cc912eb44f498cb26fdaea990ab = echarts.init(\n",
       "            document.getElementById('207a6cc912eb44f498cb26fdaea990ab'), 'white', {renderer: 'canvas'});\n",
       "\t    var option_207a6cc912eb44f498cb26fdaea990ab = {\n",
       "           \"globe\": {\n",
       "           \"show\": true,\n",
       "\t\t   \"baseTexture\": mapChart_207a6cc912eb44f498cb26fdaea990ab,\n",
       "           shading: 'lambert',\n",
       "            light: {\n",
       "                ambient: {\n",
       "                    intensity: 0.6\n",
       "                },\n",
       "                main: {\n",
       "                    intensity: 0.2\n",
       "                }\n",
       "             }\n",
       "\n",
       "\t\t   }};\n",
       "        chart_207a6cc912eb44f498cb26fdaea990ab.setOption(option_207a6cc912eb44f498cb26fdaea990ab);\n",
       "    });\n",
       "</script>\n"
      ],
      "text/plain": [
       "<pyecharts.render.display.HTML at 0x7fbb88280940>"
      ]
     },
     "execution_count": 3,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "import pyecharts.options as opts\n",
    "from pyecharts.charts import MapGlobe\n",
    "from pyecharts.faker import POPULATION\n",
    "\n",
    "data = [x for _, x in POPULATION[1:]]\n",
    "low, high = min(data), max(data)\n",
    "\n",
    "c = (\n",
    "    MapGlobe()\n",
    "    .add_schema()\n",
    "    .add(\n",
    "        maptype=\"world\",\n",
    "        series_name=\"World Population\",\n",
    "        data_pair=POPULATION[1:],\n",
    "        is_map_symbol_show=False,\n",
    "        label_opts=opts.LabelOpts(is_show=False),\n",
    "    )\n",
    "    .set_global_opts(\n",
    "        visualmap_opts=opts.VisualMapOpts(\n",
    "            min_=low,\n",
    "            max_=high,\n",
    "            range_text=[\"max\", \"min\"],\n",
    "            is_calculable=True,\n",
    "            range_color=[\"lightskyblue\", \"yellow\", \"orangered\"],\n",
    "        )\n",
    "    )\n",
    "    #.render(\"map_globe_base.html\")\n",
    ")\n",
    "c.load_javascript()\n",
    "c.render_notebook()"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {},
   "outputs": [],
   "source": []
  }
 ],
 "metadata": {
  "kernelspec": {
   "display_name": "Python 3",
   "language": "python",
   "name": "python3"
  },
  "language_info": {
   "codemirror_mode": {
    "name": "ipython",
    "version": 3
   },
   "file_extension": ".py",
   "mimetype": "text/x-python",
   "name": "python",
   "nbconvert_exporter": "python",
   "pygments_lexer": "ipython3",
   "version": "3.7.3"
  }
 },
 "nbformat": 4,
 "nbformat_minor": 2
}
